OrbitBehaviorAnaglyph

com.interactivemesh.j3d.community.utils.navigation.orbitanaglyph
Class ViewPlatformBehaviorInterim

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 com.interactivemesh.j3d.community.utils.navigation.orbitanaglyph.ViewPlatformBehaviorInterim
Direct Known Subclasses:
ViewPlatformAWTBehaviorInterim

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

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

Since:
Java 3D 1.2.1

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
ViewPlatformBehaviorInterim()
           
 
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 (since 1.1).

Since:
Java 3D 1.3

homeRotCenter

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

Since:
Version 1.1
Constructor Detail

ViewPlatformBehaviorInterim

public ViewPlatformBehaviorInterim()
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 (since 1.1)
Since:
Java 3D 1.3

getHomeTransform

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

Parameters:
home - transform to be returned
Since:
Java 3D 1.3

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
Since:
Version 1.1

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)
Since:
Version 1.1

goHome

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

Since:
Java 3D 1.3

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
Since:
Java 3D 1.3, Version 1.1

OrbitBehaviorAnaglyph