| 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.PositionPathInterpolator
PositionPathInterpolator | public class PositionPathInterpolator extends PathInterpolator (Code) | | PositionPathInterpolator behavior. This class defines a behavior
that modifies the translational component of its target TransformGroup
by linearly interpolating among a series of predefined knot/position
pairs (using the value generated by the specified Alpha object). The
interpolated position is used to generate a translation 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 PositionPathInterpolator information from
originalNode into
the current node. | public Transform3D | getAxisOfTranslation() | 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 | setAxisOfTranslation(Transform3D axisOfTranslation) | public void | setPathArrays(float[] knots, Point3f[] positions) Replaces the existing arrays of knot 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. |
PositionPathInterpolator | PositionPathInterpolator()(Code) | | |
PositionPathInterpolator | public PositionPathInterpolator(Alpha alpha, TransformGroup target, Transform3D axisOfTransform, float[] knots, Point3f[] positions)(Code) | | Constructs a new PositionPathInterpolator that varies the transform
of the target TransformGroup.
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 coordinate system in which this interpolator operates Parameters: knots - an array of knot values that specify interpolation points. Parameters: positions - an array of position values at the knots. exception: IllegalArgumentException - if the lengths of theknots and positions arrays are not 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 PositionPathInterpolator 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 variable to receive the position value atthe specified 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 |
setAxisOfTranslation | public void setAxisOfTranslation(Transform3D axisOfTranslation)(Code) | | |
setPathArrays | public void setPathArrays(float[] knots, Point3f[] positions)(Code) | | Replaces the existing arrays of knot values
and position values with the specified arrays.
The arrays of knots and positions are copied
into this interpolator object.
Parameters: knots - a new array of knot values that specifyinterpolation points Parameters: positions - a new array of position values at the knots exception: IllegalArgumentException - if the lengths of theknots and positions arrays are not 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 of the position to be changed Parameters: position - the new position at the index |
|
|