org.wilmascope.centernode
Class CenterNode

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 javax.media.j3d.Interpolator
                      extended by org.wilmascope.centernode.CenterNode

public class CenterNode
extends javax.media.j3d.Interpolator

Class CenterNode translates the selected node to the center of the screen and zooms it to an appropriate size.


Field Summary
 
Fields inherited from class javax.media.j3d.Interpolator
defaultWakeupCriterion
 
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_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
CenterNode(javax.media.j3d.TransformGroup target)
           
 
Method Summary
 void initialize()
          Initializes the wake up event:wake up every 25 miliseconds
 void processStimulus(java.util.Enumeration e)
          Translate the whole scene graph a little every time wakes up
 void setOriginPosition(javax.vecmath.Vector3f position)
          Sets the origin position to the specified position
 void setOriginPosition(javax.vecmath.Vector3f position, float width)
          Sets the origin position to the specified position
 
Methods inherited from class javax.media.j3d.Interpolator
getAlpha, setAlpha
 
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, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CenterNode

public CenterNode(javax.media.j3d.TransformGroup target)
Parameters:
target - The TransformGroup class Center Node manipulates
Method Detail

initialize

public void initialize()
Initializes the wake up event:wake up every 25 miliseconds

Overrides:
initialize in class javax.media.j3d.Interpolator

processStimulus

public void processStimulus(java.util.Enumeration e)
Translate the whole scene graph a little every time wakes up

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

setOriginPosition

public void setOriginPosition(javax.vecmath.Vector3f position)
Sets the origin position to the specified position


setOriginPosition

public void setOriginPosition(javax.vecmath.Vector3f position,
                              float width)
Sets the origin position to the specified position

Parameters:
position - target origin
width - of the object that needs to fit in the viewport