| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.Node javax.media.j3d.Leaf javax.media.j3d.Behavior javax.media.j3d.Interpolator javax.media.j3d.TransformInterpolator javax.media.j3d.PathInterpolator javax.media.j3d.RotPosPathInterpolator
RotPosPathInterpolator | public class RotPosPathInterpolator extends PathInterpolator (Code) | | RotPosPathInterpolator behavior. This class defines a behavior that
modifies the rotational and translational components of its target
TransformGroup by linearly interpolating among a series of predefined
knot/positon and knot/orientation pairs (using the value generated
by the specified Alpha object). The interpolated position and
orientation are used to generate a transform in the local coordinate
system of this interpolator.
|
Method Summary | |
public Node | cloneNode(boolean forceDuplicate) Used to create a new instance of the node. | public void | computeTransform(float alphaValue, Transform3D transform) Computes the new transform for this interpolator for a given
alpha value. | void | duplicateAttributes(Node originalNode, boolean forceDuplicate) Copies all RotPosPathInterpolator information from
originalNode into
the current node. | public Transform3D | getAxisOfRotPos() | public void | getPosition(int index, Point3f position) Retrieves the position value at the specified index. | public void | getPositions(Point3f[] positions) Copies the array of position values from this interpolator
into the specified array. | public void | getQuat(int index, Quat4f quat) Retrieves the quat value at the specified index. | public void | getQuats(Quat4f[] quats) Copies the array of quaternion values from this interpolator
into the specified array. | public void | setAxisOfRotPos(Transform3D axisOfRotPos) | public void | setPathArrays(float[] knots, Quat4f[] quats, Point3f[] positions) Replaces the existing arrays of knot values, quaternion
values, and position values with the specified arrays. | public void | setPosition(int index, Point3f position) Sets the position at the specified index for this
interpolator. | public void | setQuat(int index, Quat4f quat) Sets the quat at the specified index for this interpolator. |
RotPosPathInterpolator | RotPosPathInterpolator()(Code) | | |
RotPosPathInterpolator | public RotPosPathInterpolator(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, float[] knots, Quat4f[] quats, Point3f[] positions)(Code) | | Constructs a new interpolator that varies the rotation and translation
of the target TransformGroup's transform.
Parameters: alpha - the alpha object for this interpolator Parameters: target - the TransformGroup node affected by this translator Parameters: axisOfTransform - the transform that defines the local coordinatesystem in which this interpolator operates Parameters: knots - an array of knot values that specify interpolation points. Parameters: quats - an array of quaternion values at the knots. Parameters: positions - an array of position values at the knots. exception: IllegalArgumentException - if the lengths of theknots, quats, and positions arrays are not all the same. |
cloneNode | public Node cloneNode(boolean forceDuplicate)(Code) | | Used to create a new instance of the node. This routine is called
by cloneTree to duplicate the current node.
Parameters: forceDuplicate - when set to true , causes theduplicateOnCloneTree flag to be ignored. Whenfalse , the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied. See Also: Node.cloneTree See Also: Node.cloneNode See Also: Node.duplicateNode See Also: NodeComponent.setDuplicateOnCloneTree |
computeTransform | public void computeTransform(float alphaValue, Transform3D transform)(Code) | | Computes the new transform for this interpolator for a given
alpha value.
Parameters: alphaValue - alpha value between 0.0 and 1.0 Parameters: transform - object that receives the computed transform forthe specified alpha value since: Java 3D 1.3 |
duplicateAttributes | void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code) | | Copies all RotPosPathInterpolator information from
originalNode into
the current node. This method is called from the
cloneNode method which is, in turn, called by the
cloneTree method.
Parameters: originalNode - the original node to duplicate. Parameters: forceDuplicate - when set to true , causes theduplicateOnCloneTree flag to be ignored. Whenfalse , the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied. exception: RestrictedAccessException - if this object is part of a liveor compiled scenegraph. See Also: Node.duplicateNode See Also: Node.cloneTree See Also: NodeComponent.setDuplicateOnCloneTree |
getPosition | public void getPosition(int index, Point3f position)(Code) | | Retrieves the position value at the specified index.
Parameters: index - the index of the value requested Parameters: position - the position to receive the position value at the index |
getPositions | public void getPositions(Point3f[] positions)(Code) | | Copies the array of position values from this interpolator
into the specified array.
The array must be large enough to hold all of the positions.
The individual array elements must be allocated by the caller.
Parameters: positions - array that will receive the positions. since: Java 3D 1.2 |
getQuat | public void getQuat(int index, Quat4f quat)(Code) | | Retrieves the quat value at the specified index.
Parameters: index - the index of the value requested Parameters: quat - the quat to receive the quat value at the index |
getQuats | public void getQuats(Quat4f[] quats)(Code) | | Copies the array of quaternion values from this interpolator
into the specified array.
The array must be large enough to hold all of the quats.
The individual array elements must be allocated by the caller.
Parameters: quats - array that will receive the quats. since: Java 3D 1.2 |
setPathArrays | public void setPathArrays(float[] knots, Quat4f[] quats, Point3f[] positions)(Code) | | Replaces the existing arrays of knot values, quaternion
values, and position values with the specified arrays.
The arrays of knots, quats, and positions are copied
into this interpolator object.
Parameters: knots - a new array of knot values that specifyinterpolation points. Parameters: quats - a new array of quaternion values at the knots. Parameters: positions - a new array of position values at the knots. exception: IllegalArgumentException - if the lengths of theknots, quats, and positions arrays are not all the same. since: Java 3D 1.2 |
setPosition | public void setPosition(int index, Point3f position)(Code) | | Sets the position at the specified index for this
interpolator.
Parameters: index - the index to be changed Parameters: position - the new position value |
setQuat | public void setQuat(int index, Quat4f quat)(Code) | | Sets the quat at the specified index for this interpolator.
Parameters: index - the index to be changed Parameters: quat - the new quat value |
|
|