Package org.xj3d.sai
Interface Xj3DNavigationUIManager
public interface Xj3DNavigationUIManager
An abstract interface for navigation-specific user interface control of the
the browser.
This allows an external application to replace existing chunks of the user interface controls with their own custom code, yet retain all the functionality of the stock user interface. Making calls to methods on this class will ensure that all requirements for synchronising with the browser's internal event model will be met. Note that calls to these methods will not be subject to the SAI's beginUpdate()/endUpdate() buffering strategy. However, it will comply to all the rest of the event model behaviour, such as
- Version:
- $Revision: 1.4 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener for navigation UI feedback.void
fitToWorld
(boolean animated) Activate the temporary navigation state that places the viewpoint in a position such that the entire world fits within the borders of the current viewspace.Get the list of current viewpoints that are to be displayed.Get the current navigation state that is active.void
Change to the next viewpoint in the list.void
Change to the previous viewpoint in the list.void
Move the viewpoint back to the default position of the currently active bound viewpoint.void
Remove a listener for navigation UI feedback.void
Select the given viewpoint as the new location to move to.void
setNavigationState
(String state) Change the navigation state to the new state as indicated by the given string.void
Correct the viewpoint's current orientation so that it is back into the default orientation for the currently bound viewpoint.void
Activate the temporary navigation state that has the viewpoint look at the next object that is clicked.
-
Method Details
-
fitToWorld
void fitToWorld(boolean animated) Activate the temporary navigation state that places the viewpoint in a position such that the entire world fits within the borders of the current viewspace.- Parameters:
animated
- True if the movement should be animated to the final viewpoint position
-
viewpointLookAt
void viewpointLookAt()Activate the temporary navigation state that has the viewpoint look at the next object that is clicked. -
recenterViewpoint
void recenterViewpoint()Move the viewpoint back to the default position of the currently active bound viewpoint. This is used to move the user back to that location after they have navigated away from that location using an input device. -
straightenViewpoint
void straightenViewpoint()Correct the viewpoint's current orientation so that it is back into the default orientation for the currently bound viewpoint. Used to help the user out when they have strayed or got themselves completely confused using a nav mode that allows them to become inverted or otherwise mixed up. -
nextViewpoint
void nextViewpoint()Change to the next viewpoint in the list. The definition of next here corresponds to the SAI definition of the same. In fact, this will work identically toBrowser.nextViewpoint()
call. -
previousViewpoint
void previousViewpoint()Change to the previous viewpoint in the list. The definition of previous here corresponds to the SAI definition of the same. In fact, this will work identically toBrowser.previousViewpoint()
call. -
getCurrentViewpoints
Xj3DViewpoint[] getCurrentViewpoints()Get the list of current viewpoints that are to be displayed. Current is based on the active navigation layer. If there are no viewpoints for this layer due to there being none defined (i.e. just the default bindable) then the list will be null.- Returns:
- A list of all the current viewpoints to display
-
selectViewpoint
Select the given viewpoint as the new location to move to. If this is no longer a valid viewpoint for the current list, an exception will be generated. Passing in a null value is not permitted, even though the listener may pass you one for when the default bindable is selected.- Parameters:
vp
- The viewpoint instance to use