BS Contact J : Java-EAI : Realizing a CylinderSensor using the AWT Observer To receive the user's mouse events, one has to register an AWT observer
next. This is done after the connection to the render applet has been
established by adding the line |
public boolean onEvent(java.awt.Event
event) { |
Whenever the mouse is dragged, the update3d method is called. Update3d
first retrieves the current orientation of the node by using the method private void update3d(int
delta) { // get current orientation // sync with renderer // set new orientation // continue rendering } |