org.jdesktop.j3d.utils.behaviors.vp
Class AxisBehavior

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Leaf
              extended by javax.media.j3d.Behavior
                  extended by org.jdesktop.j3d.utils.behaviors.vp.AxisBehavior

public class AxisBehavior
extends javax.media.j3d.Behavior

Behavior class to extract the rotation component of the view platform transform, and set the axis transform to the inverse of that rotation. The axis should be added as a child of the platform geometry. Note that this behavior must run after the view platform behavior.


Field Summary
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
AxisBehavior(javax.media.j3d.TransformGroup axisTG, javax.media.j3d.TransformGroup viewPlatformTG)
          Constructs a new AxisBehavior from the specified view platform transform group and axis transform group.
 
Method Summary
 void initialize()
          Initialize local variables and set the initial wakeup condition.
 void processStimulus(java.util.Enumeration criteria)
          Extract the rotation from the view platform transform (if it has changed) and update the target transform with its inverse.
 
Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn
 
Methods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AxisBehavior

public AxisBehavior(javax.media.j3d.TransformGroup axisTG,
                    javax.media.j3d.TransformGroup viewPlatformTG)
Constructs a new AxisBehavior from the specified view platform transform group and axis transform group.

Method Detail

initialize

public void initialize()
Initialize local variables and set the initial wakeup condition. Called when the behavior is first made live.

Specified by:
initialize in class javax.media.j3d.Behavior

processStimulus

public void processStimulus(java.util.Enumeration criteria)
Extract the rotation from the view platform transform (if it has changed) and update the target transform with its inverse.

Specified by:
processStimulus in class javax.media.j3d.Behavior