| 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.RotPosScalePathInterpolator
RotPosScalePathInterpolator | public class RotPosScalePathInterpolator extends PathInterpolator (Code) | | RotPosScalePathInterpolation behavior. This class defines a behavior
that varies the rotational, translational, and scale components of its
target TransformGroup by linearly interpolating among a series of
predefined knot/position, knot/orientation, and knot/scale pairs
(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. The
first knot must have a value of 0.0. The last knot must have a value
of 1.0. An intermediate knot with index k must have a value strictly
greater than any knot with index less than k.
|
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 RotPosScalePathInterpolator information from
originalNode into
the current node. | public Transform3D | getAxisOfRotPosScale() | 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 float | getScale(int index) Retrieves the scale at the specified index. | public void | getScales(float[] scales) Copies the array of scale values from this interpolator
into the specified array. | public void | setAxisOfRotPosScale(Transform3D axisOfRotPosScale) | public void | setPathArrays(float[] knots, Quat4f[] quats, Point3f[] positions, float[] scales) Replaces the existing arrays of knot values, quaternion
values, position values, and scale values with the specified arrays. | public void | setPosition(int index, Point3f position) Sets the position value at the specified index for
this interpolator. | public void | setQuat(int index, Quat4f quat) Sets the quat value at the specified index for this
interpolator. | public void | setScale(int index, float scale) Sets the scale at the specified index for this
interpolator. |
RotPosScalePathInterpolator | RotPosScalePathInterpolator()(Code) | | |
RotPosScalePathInterpolator | public RotPosScalePathInterpolator(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, float[] knots, Quat4f[] quats, Point3f[] positions, float[] scales)(Code) | | Constructs a new RotPosScalePathInterpolator object that varies the
rotation, translation, and scale of the target TransformGroup's
transform.
Parameters: alpha - the alpha object for this interpolator. Parameters: target - the TransformGroup node affected by this interpolator. Parameters: axisOfTransform - the transform that specifies the localcoordinate system 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. Parameters: scales - an array of scale component values at the knots. exception: IllegalArgumentException - if the lengths of theknots, quats, positions, and scales 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 RotPosScalePathInterpolator 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 - returns the interpolator's 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 - returns the interpolator's 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 |
getScale | public float getScale(int index)(Code) | | Retrieves the scale at the specified index.
Parameters: index - the index of the value requested the interpolator's scale value at index |
getScales | public void getScales(float[] scales)(Code) | | Copies the array of scale values from this interpolator
into the specified array.
The array must be large enough to hold all of the scales.
Parameters: scales - array that will receive the scales. since: Java 3D 1.2 |
setAxisOfRotPosScale | public void setAxisOfRotPosScale(Transform3D axisOfRotPosScale)(Code) | | |
setPathArrays | public void setPathArrays(float[] knots, Quat4f[] quats, Point3f[] positions, float[] scales)(Code) | | Replaces the existing arrays of knot values, quaternion
values, position values, and scale values with the specified arrays.
The arrays of knots, quats, positions, and scales 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. Parameters: scales - a new array of scale component values at the knots. exception: IllegalArgumentException - if the lengths of theknots, quats, positions, and scales arrays are not all the same. since: Java 3D 1.2 |
setPosition | public void setPosition(int index, Point3f position)(Code) | | Sets the position value at the specified index for
this interpolator.
Parameters: index - the index to be changed Parameters: position - the new position value at index |
setQuat | public void setQuat(int index, Quat4f quat)(Code) | | Sets the quat value at the specified index for this
interpolator.
Parameters: index - the index to be changed Parameters: quat - the new quat value at index |
setScale | public void setScale(int index, float scale)(Code) | | Sets the scale at the specified index for this
interpolator.
Parameters: index - the index to be changed Parameters: scale - the new scale at index |
|
|