javax.media.j3d
Class Interpolator

java.lang.Object
  |
  +--javax.media.j3d.SceneGraphObject
        |
        +--javax.media.j3d.Node
              |
              +--javax.media.j3d.Leaf
                    |
                    +--javax.media.j3d.Behavior
                          |
                          +--javax.media.j3d.Interpolator
Direct Known Subclasses:
ColorInterpolator, PathInterpolator, PositionInterpolator, RotationInterpolator, ScaleInterpolator, SwitchValueInterpolator, TransparencyInterpolator

public abstract class Interpolator
extends Behavior

The Interpolation behavior is an abstract class that provides the building blocks used by its various interpolation specializations.


Field Summary
protected  WakeupCriterion defaultWakeupCriterion
          Default WakeupCondition for all interpolators.
 
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_PICK, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
Interpolator()
          Constructs an Interpolator node with a null alpha value.
Interpolator(Alpha alpha)
          Constructs an Interpolator node with the specified alpha value.
 
Method Summary
 void duplicateNode(Node originalNode, boolean forceDuplicate)
          Copies all node information from originalNode into the current node.
 Alpha getAlpha()
          Retrieves this interpolator's alpha object.
 void initialize()
          This is the default Interpolator behavior initialization routine.
 void setAlpha(Alpha alpha)
          Set this interpolator's alpha to the specified alpha object.
 
Methods inherited from class javax.media.j3d.Behavior
getEnable, getSchedulingBoundingLeaf, getSchedulingBounds, getView, postId, processStimulus, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, updateNodeReferences, wakeupOn
 
Methods inherited from class javax.media.j3d.Node
cloneNode, cloneTree, cloneTree, cloneTree, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, duplicateSceneGraphObject, getCapability, getUserData, isCompiled, isLive, setCapability, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultWakeupCriterion

protected WakeupCriterion defaultWakeupCriterion
Default WakeupCondition for all interpolators. The wakeupOn method of Behavior, which takes a WakeupCondition as the method parameter, will need to be called at the end of the processStimulus method of any class that subclasses Interpolator; this can be done with the following method call: wakeupOn(defaultWakeupCriterion).
Constructor Detail

Interpolator

public Interpolator()
Constructs an Interpolator node with a null alpha value.

Interpolator

public Interpolator(Alpha alpha)
Constructs an Interpolator node with the specified alpha value.
Parameters:
alpha - the alpha object used by this interpolator. If it is null, then this interpolator will not run.
Method Detail

getAlpha

public Alpha getAlpha()
Retrieves this interpolator's alpha object.
Returns:
this interpolator's alpha object

setAlpha

public void setAlpha(Alpha alpha)
Set this interpolator's alpha to the specified alpha object.
Parameters:
alpha - the new alpha object. If set to null, then this interpolator will stop running.

initialize

public void initialize()
This is the default Interpolator behavior initialization routine. It schedules the behavior to awaken at the next frame.
Overrides:
initialize in class Behavior

duplicateNode

public void duplicateNode(Node originalNode,
                          boolean forceDuplicate)
Copies all node information from originalNode into the current node. This method is called from the cloneNode method which is, in turn, called by the cloneTree method.

For any NodeComponent objects contained by the object being duplicated, each NodeComponent object's duplicateOnCloneTree value is used to determine whether the NodeComponent should be duplicated in the new node or if just a reference to the current node should be placed in the new node. This flag can be overridden by setting the forceDuplicate parameter in the cloneTree method to true.

Overrides:
duplicateNode in class Behavior
Parameters:
originalNode - the original node to duplicate.
forceDuplicate - when set to true, causes the duplicateOnCloneTree flag to be ignored. When false, the value of each node's duplicateOnCloneTree variable determines whether NodeComponent data is duplicated or copied.
See Also:
Node.cloneTree(), Node.cloneNode(boolean), NodeComponent.setDuplicateOnCloneTree(boolean)