com.vwp.j3d.utils.behaviors.interpolators
Class RotationInterpolatorX

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 javax.media.j3d.RotationInterpolator
                              extended by com.vwp.j3d.utils.behaviors.interpolators.RotationInterpolatorX
Direct Known Subclasses:
RotationInterpolatorXYZ, RotationInterpolatorY, RotationInterpolatorZ

public class RotationInterpolatorX
extends javax.media.j3d.RotationInterpolator

This class bases on different interpolator classes from com.sun.j3d.utils.behaviours.interpolators and performs a rotation interpolation around the X axis


Field Summary
 
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_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
RotationInterpolatorX(javax.media.j3d.Alpha alpha, javax.media.j3d.TransformGroup transformgroup, double x, double y, double z)
          Constructor for a rotation interpolator object
RotationInterpolatorX(javax.media.j3d.Alpha alpha, javax.media.j3d.TransformGroup transformgroup, javax.media.j3d.Transform3D transform3d, double f, double f1, double x, double y, double z)
          Constructor for a rotation interpolator object
 
Method Summary
 void emulateFrameSwitch(int framerate)
          This method lets this Interpolator work also if no frame switching occurs
 float getMaximumAngle()
          Returns the end angle for the rotation interpolator
 float getMinimumAngle()
          Returns the start angle for the rotation interpolator
 javax.media.j3d.TransformGroup getTarget()
          Returns the TransformGroup which is target for the actual rotation interpolator
 void processStimulus(Enumeration enumeration)
           
 void setBaseRotation(double x, double y, double z)
          Sets the initial rotation angles for the actual used transform group; one of these axises is modified by the appropriate rotation interpolator
 void setMaximumAngle(float f)
          Sets the end angle for the rotation interpolator
 void setMinimumAngle(float f)
          Sets the start angle for the rotation interpolator
 void setTarget(javax.media.j3d.TransformGroup transformgroup)
          Sets the TransformGroup which has to be the target for the actual rotation interpolator
 
Methods inherited from class javax.media.j3d.RotationInterpolator
cloneNode, computeTransform, getAxisOfRotation, setAxisOfRotation
 
Methods inherited from class javax.media.j3d.TransformInterpolator
getTransformAxis, 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, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval
 
Methods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RotationInterpolatorX

public RotationInterpolatorX(javax.media.j3d.Alpha alpha,
                             javax.media.j3d.TransformGroup transformgroup,
                             double x,
                             double y,
                             double z)
Constructor for a rotation interpolator object

Parameters:
alpha - An Alpha object which describes the rotation that has to be performed
transformgroup - The transform group which has to be used to perform the rotation with
x - Initial x-angle, this value will be modified during this interpolator is active
y - Initial y-angle, this angle will not be influenced or modified by this interpolator
z - Initial z-angle, this angle will not be influenced or modified by this interpolator

RotationInterpolatorX

public RotationInterpolatorX(javax.media.j3d.Alpha alpha,
                             javax.media.j3d.TransformGroup transformgroup,
                             javax.media.j3d.Transform3D transform3d,
                             double f,
                             double f1,
                             double x,
                             double y,
                             double z)
Constructor for a rotation interpolator object

Parameters:
alpha - An Alpha object which describes the rotation that has to be performed
transformgroup - The transform group which has to be used to perform the rotation with
f - The angle where the rotation has to start from
f1 - The end angle to what the interpolator has the object rotate to
x - Initial x-angle, this value will be modified during this interpolator is active
y - Initial y-angle, this angle will not be influenced or modified by this interpolator
z - Initial z-angle, this angle will not be influenced or modified by this interpolator
Method Detail

emulateFrameSwitch

public void emulateFrameSwitch(int framerate)
This method lets this Interpolator work also if no frame switching occurs

Parameters:
framerate - the number of frames per second which have to be emulated

setBaseRotation

public void setBaseRotation(double x,
                            double y,
                            double z)
Sets the initial rotation angles for the actual used transform group; one of these axises is modified by the appropriate rotation interpolator

Parameters:
x - Initial x-angle
y - Initial y-angle
z - Initial z-angle

setMinimumAngle

public void setMinimumAngle(float f)
Sets the start angle for the rotation interpolator

Overrides:
setMinimumAngle in class javax.media.j3d.RotationInterpolator
Parameters:
f - The angle where the rotation has to start from

getMinimumAngle

public float getMinimumAngle()
Returns the start angle for the rotation interpolator

Overrides:
getMinimumAngle in class javax.media.j3d.RotationInterpolator

setMaximumAngle

public void setMaximumAngle(float f)
Sets the end angle for the rotation interpolator

Overrides:
setMaximumAngle in class javax.media.j3d.RotationInterpolator
Parameters:
f - The end angle to what the interpolator has the object rotate to

getMaximumAngle

public float getMaximumAngle()
Returns the end angle for the rotation interpolator

Overrides:
getMaximumAngle in class javax.media.j3d.RotationInterpolator

setTarget

public void setTarget(javax.media.j3d.TransformGroup transformgroup)
Sets the TransformGroup which has to be the target for the actual rotation interpolator

Overrides:
setTarget in class javax.media.j3d.TransformInterpolator
Parameters:
transformgroup - The target TransformGroup

getTarget

public javax.media.j3d.TransformGroup getTarget()
Returns the TransformGroup which is target for the actual rotation interpolator

Overrides:
getTarget in class javax.media.j3d.TransformInterpolator

processStimulus

public void processStimulus(Enumeration enumeration)
Overrides:
processStimulus in class javax.media.j3d.TransformInterpolator