Package org.xj3d.impl.core.eventmodel
Class DefaultNavigationManager
java.lang.Object
org.xj3d.impl.core.eventmodel.DefaultNavigationManager
- All Implemented Interfaces:
NavigationStateListener
,NavigationManager
public class DefaultNavigationManager
extends Object
implements NavigationManager, NavigationStateListener
An abstract representation of a class that would be responsible for
performing Viewpoint management.
This interface represents a further abstracted view of viewpoint management
handling beyond the BrowserCore
. This gives you
all the handling that is normally seen at a user interface level. You should
use one or the other, but not both as implementations of this class will
also interact with BrowserCore.
Note: This code does not current handle the navigation info nodes. It only deals with the string type list as that is all we currently have available from the browser internals.
- Version:
- $Revision: 1.3 $
- Author:
- Justin Couch
-
Field Summary
Fields inherited from interface org.web3d.browser.NavigationStateListener
EXAMINE_STATE, FLY_STATE, NO_STATE, PAN_STATE, TILT_STATE, WALK_STATE
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance of this manager that works with the given browser core representation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener for viewpoint status messages.void
clear()
Force clearing all currently managed nodes from this manager now.int
Fetch the index into the navigation type array of the actual type of navigation being used by the system.Get the list of active navigation modes for the current active navigation layer.Gets the viewpoints for the currently active layer.Get the current active navigation info node.void
navigationListChanged
(String[] modes, int numTypes) Notification that the list of valid navigation modes has changed.void
navigationStateChanged
(int idx) Notification that the navigation state has changed to the new state.void
Remove a listener for viewpoint status messages.void
setActiveNavigationIndex
(int idx) Set the active navigation index of the current list.void
setErrorReporter
(org.j3d.util.ErrorReporter reporter) Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion.void
Set the current navigation info.void
shutdown()
Shutdown the node manager now.
-
Constructor Details
-
DefaultNavigationManager
Create a new instance of this manager that works with the given browser core representation.- Parameters:
core
- The browser core to work with
-
-
Method Details
-
clear
public void clear()Force clearing all currently managed nodes from this manager now. This is used to indicate that a new world is about to be loaded and everything should be cleaned out now.- Specified by:
clear
in interfaceNavigationManager
-
shutdown
public void shutdown()Shutdown the node manager now. If this is using any external resources it should remove those now as the entire application is about to die- Specified by:
shutdown
in interfaceNavigationManager
-
setErrorReporter
public void setErrorReporter(org.j3d.util.ErrorReporter reporter) Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.- Specified by:
setErrorReporter
in interfaceNavigationManager
- Parameters:
reporter
- The instance to use or null