com.sun.j3d.utils.behaviors.interpolators
Class RotPosScaleTCBSplinePathInterpolator

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 javax.media.j3d.TransformInterpolator
                          extended by com.sun.j3d.utils.behaviors.interpolators.TCBSplinePathInterpolator
                              extended by com.sun.j3d.utils.behaviors.interpolators.RotPosScaleTCBSplinePathInterpolator

public class RotPosScaleTCBSplinePathInterpolator
extends TCBSplinePathInterpolator

RotPosScaleTCBSplinePathInterpolator behavior. This class defines a behavior that varies the rotational, translational, and scale components of its target TransformGroup by using the Kochanek-Bartels cubic spline interpolation to interpolate among a series of key frames (using the value generated by the specified Alpha object). The interpolated position, orientation, and scale are used to generate a transform in the local coordinate system of this interpolator.

Since:
Java3D 1.1

Field Summary
 
Fields inherited from class com.sun.j3d.utils.behaviors.interpolators.TCBSplinePathInterpolator
currentU, keyFrames, lowerKnot, upperKnot
 
Fields inherited from class javax.media.j3d.TransformInterpolator
axis, axisInverse, target
 
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_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
RotPosScaleTCBSplinePathInterpolator(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, TCBKeyFrame[] keys)
          Constructs a new RotPosScaleTCBSplinePathInterpolator object that varies the rotation, translation, and scale of the target TransformGroup's transform.
 
Method Summary
 Node cloneNode(boolean forceDuplicate)
          Used to create a new instance of the node.
 void computeTransform(float alphaValue, Transform3D transform)
          Computes the new transform for this interpolator for a given alpha value.
 void duplicateNode(Node originalNode, boolean forceDuplicate)
          Copies RotPosScaleTCBSplinePathInterpolator information from originalNode into the current node.
 Transform3D getAxisOfRotPosScale()
          Deprecated. As of Java 3D version 1.3, replaced by TransformInterpolator.getTransformAxis()
 void setAxisOfRotPosScale(Transform3D axisOfRotPosScale)
          Deprecated. As of Java 3D version 1.3, replaced by TransformInterpolator.setTransformAxis(Transform3D)
 
Methods inherited from class com.sun.j3d.utils.behaviors.interpolators.TCBSplinePathInterpolator
computePathInterpolation, computePathInterpolation, getArrayLength, getKeyFrame
 
Methods inherited from class javax.media.j3d.TransformInterpolator
getTarget, getTransformAxis, processStimulus, setTarget, setTransformAxis, updateNodeReferences
 
Methods inherited from class javax.media.j3d.Interpolator
getAlpha, initialize, setAlpha
 
Methods inherited from class javax.media.j3d.Behavior
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, wakeupOn
 
Methods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, 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

RotPosScaleTCBSplinePathInterpolator

public RotPosScaleTCBSplinePathInterpolator(Alpha alpha,
                                            TransformGroup target,
                                            Transform3D axisOfTransform,
                                            TCBKeyFrame[] keys)
Constructs a new RotPosScaleTCBSplinePathInterpolator object that varies the rotation, translation, and scale of the target TransformGroup's transform. At least 2 key frames are required for this interpolator. The first key frame's knot must have a value of 0.0 and the last knot must have a value of 1.0. An intermediate key frame with index k must have a knot value strictly greater than the knot value of a key frame with index less than k.

Parameters:
alpha - the alpha object for this interpolator
target - the TransformGroup node affected by this interpolator
axisOfTransform - the transform that specifies the local coordinate system in which this interpolator operates.
keys - an array of key frames that defien the motion path
Method Detail

setAxisOfRotPosScale

public void setAxisOfRotPosScale(Transform3D axisOfRotPosScale)
Deprecated. As of Java 3D version 1.3, replaced by TransformInterpolator.setTransformAxis(Transform3D)


getAxisOfRotPosScale

public Transform3D getAxisOfRotPosScale()
Deprecated. As of Java 3D version 1.3, replaced by TransformInterpolator.getTransformAxis()


computeTransform

public void computeTransform(float alphaValue,
                             Transform3D transform)
Computes the new transform for this interpolator for a given alpha value.

Specified by:
computeTransform in class TransformInterpolator
Parameters:
alphaValue - alpha value between 0.0 and 1.0
transform - object that receives the computed transform for the specified alpha value
Since:
Java 3D 1.3

cloneNode

public Node cloneNode(boolean forceDuplicate)
Used to create a new instance of the node. This routine is called by cloneTree to duplicate the current node.

Overrides:
cloneNode in class Node
Parameters:
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), Node.duplicateNode(javax.media.j3d.Node, boolean), NodeComponent.setDuplicateOnCloneTree(boolean)

duplicateNode

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

Overrides:
duplicateNode in class TCBSplinePathInterpolator
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.
Throws:
RestrictedAccessException - if this object is part of a live or compiled scenegraph.
See Also:
Node.duplicateNode(javax.media.j3d.Node, boolean), Node.cloneTree(), NodeComponent.setDuplicateOnCloneTree(boolean)


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.