|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.j3d.renderer.java3d.navigation.NavigationProcessor
org.j3d.renderer.java3d.navigation.NavigationHandler
A listener and handler responsible for executing all navigation commands from mice to move a viewpoint around a scene.
This class does not contain any direct event handling. Instead it assumes that another class with either derive from it or delegate to it to do the actual movement processing. This allows it to be used as a standard AWT event listener or a Java3D behaviour as required by the software.
Separate states are allowed to be set for each button. Once one button is pressed, all the other button presses are ignored. By default, all the buttons start with no state set. The user will have to explicitly set the state for each button to get them to work.
Depending on the requirements of the user, the speed scale factor can be computed
| Field Summary |
| Fields inherited from class org.j3d.renderer.java3d.navigation.NavigationProcessor |
AVATAR_CYLINDER, AVATAR_POINT, AVATAR_SHOULDERS |
| Constructor Summary | |
NavigationHandler()
Create a new mouse handler with no view information set. |
|
| Method Summary | |
void |
mouseDragged(java.awt.event.MouseEvent evt)
Process a mouse drag event to change the current movement value from the previously set value to the new value |
void |
mousePressed(java.awt.event.MouseEvent evt)
Process a mouse press and set the behavior running. |
void |
mouseReleased(java.awt.event.MouseEvent evt)
Process a mouse release to return all the values back to normal. |
void |
setButtonNavigation(int button,
int state)
Set the ability to use a given state within the handler for a specific mouse button (up to 3). |
void |
setNavigationStateListener(NavigationStateListener l)
Set the listener for navigation state change notifications. |
| Methods inherited from class org.j3d.renderer.java3d.navigation.NavigationProcessor |
getNavigationState, getPosition, getTimerBehavior, move, orient, processNextFrame, setAvatarInfo, setCenterOfRotation, setCollisionListener, setFrameUpdateListener, setNavigationSpeed, setNavigationState, setOrbitTime, setViewInfo, setViewInfo, setViewPath, setWorldInfo, startMove, stopMove |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NavigationHandler()
| Method Detail |
public void setButtonNavigation(int button,
int state)
setButtonNavigation in interface NavigationMouseProcessorbutton - The mouse button value from
MouseEventstate - The navigation state to use for that buttonpublic void setNavigationStateListener(NavigationStateListener l)
setNavigationStateListener in interface NavigationMouseProcessorl - The listener to use for change updatespublic void mousePressed(java.awt.event.MouseEvent evt)
mousePressed in interface NavigationMouseProcessorevt - The event that caused this method to be calledpublic void mouseDragged(java.awt.event.MouseEvent evt)
mouseDragged in interface NavigationMouseProcessorevt - The event that caused this method to be calledpublic void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased in interface NavigationMouseProcessorevt - The event that caused this method to be called
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||