OrbitBehaviorPivot

org.interactivemesh.pivot.wtk.j3d.nav
Class ViewPlatformBehaviorPivot

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.interactivemesh.pivot.wtk.j3d.nav.ViewPlatformBehaviorPivot
Direct Known Subclasses:
ViewPlatformEventBehaviorPivot

public abstract class ViewPlatformBehaviorPivot
extends javax.media.j3d.Behavior

Abstract class which provides the target TransformGroup and a home transform.


Field Summary
protected  javax.vecmath.Point3d homeRotCenter
          The "home" rotation center for this behavior.
protected  javax.media.j3d.Transform3D homeTransform
          The "home" transform for this behavior.
protected  javax.media.j3d.TransformGroup targetTG
          The target TransformGroup for this behavior.
 
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
ViewPlatformBehaviorPivot()
           
 
Method Summary
 void getHomeRotationCenter(javax.vecmath.Point3d homeCenter)
          Places the value of the "home" center around which the View rotates into the Point3d.
 void getHomeTransform(javax.media.j3d.Transform3D home)
          Returns the behaviors "home" transform.
 javax.media.j3d.TransformGroup getViewingTransformGroup()
          Returns the target TransformGroup of this behavior.
abstract  void goHome()
          Positions and reorients the ViewingPlatform to its "home" transform.
abstract  void goHome(boolean aroundHomeCenter)
          Positions and reorients the ViewingPlatform to its "home" transform and the current rotation center is set to the "home" rotation center if desired.
 void setHomeRotationCenter(javax.vecmath.Point3d homeCenter)
          Sets the "home" rotation center.
 void setHomeTransform(javax.media.j3d.Transform3D home)
          Copies the given Transform3D into the "home" transform, used to position and reorient the ViewingPlatform to a known point of interest.
 void setViewingTransformGroup(javax.media.j3d.TransformGroup tg)
          Sets the ViewPlatform's TransformGroup for this behavior.
 
Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, initialize, postId, processStimulus, 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
 

Field Detail

targetTG

protected javax.media.j3d.TransformGroup targetTG
The target TransformGroup for this behavior.


homeTransform

protected javax.media.j3d.Transform3D homeTransform
The "home" transform for this behavior. This is a transform used to position and orient the ViewingPlatform to a known point of interest. The default transform is the identity matrix.


homeRotCenter

protected javax.vecmath.Point3d homeRotCenter
The "home" rotation center for this behavior. The default center is (0, 0, 0).

Constructor Detail

ViewPlatformBehaviorPivot

public ViewPlatformBehaviorPivot()
Method Detail

setViewingTransformGroup

public void setViewingTransformGroup(javax.media.j3d.TransformGroup tg)
Sets the ViewPlatform's TransformGroup for this behavior. If a subclass overrides this method, it must call super.setViewingTransformGroup(tg).

Parameters:
tg - the target TransformGroup for this behavior

getViewingTransformGroup

public javax.media.j3d.TransformGroup getViewingTransformGroup()
Returns the target TransformGroup of this behavior.

Returns:
The target TransformGroup

setHomeTransform

public void setHomeTransform(javax.media.j3d.Transform3D home)
Copies the given Transform3D into the "home" transform, used to position and reorient the ViewingPlatform to a known point of interest.

Parameters:
home - source transform to be copied, if home is null the home transform is set to the identity matrix

getHomeTransform

public void getHomeTransform(javax.media.j3d.Transform3D home)
Returns the behaviors "home" transform. The default transform is the identity matrix.

Parameters:
home - transform to be returned

getHomeRotationCenter

public void getHomeRotationCenter(javax.vecmath.Point3d homeCenter)
Places the value of the "home" center around which the View rotates into the Point3d. The default center is (0, 0, 0).

Parameters:
homeCenter - The Point3d

setHomeRotationCenter

public void setHomeRotationCenter(javax.vecmath.Point3d homeCenter)
Sets the "home" rotation center.

Parameters:
homeCenter - The Point3d to set the "home" center of rotation to, if null center is set to the default value (0, 0, 0)

goHome

public abstract void goHome()
Positions and reorients the ViewingPlatform to its "home" transform.


goHome

public abstract void goHome(boolean aroundHomeCenter)
Positions and reorients the ViewingPlatform to its "home" transform and the current rotation center is set to the "home" rotation center if desired.

Parameters:
aroundHomeCenter - if true the current roation center is set to the 'home' rotation center, otherwise the center remains unchanged

OrbitBehaviorPivot