|
NCSA Portfolio | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.SceneGraphObject | +--javax.media.j3d.Node | +--javax.media.j3d.Group | +--javax.media.j3d.TransformGroup | +--ncsa.j3d.SimpleTransformGroup
This class is designed to represent a node that moves through space. It can have rotate and translate operations applied to it easily and dynamically.
Scaling, translation, and rotation are applied in an intuitive order. For example, upon doing a rotate the group will only rotate and will not change absolute location.
Fields inherited from class javax.media.j3d.TransformGroup |
ALLOW_TRANSFORM_READ,
ALLOW_TRANSFORM_WRITE |
Fields inherited from class javax.media.j3d.Group |
ALLOW_CHILDREN_EXTEND,
ALLOW_CHILDREN_READ,
ALLOW_CHILDREN_WRITE,
ALLOW_COLLISION_BOUNDS_READ,
ALLOW_COLLISION_BOUNDS_WRITE |
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_PICK,
ALLOW_PICKABLE_READ,
ALLOW_PICKABLE_WRITE,
ENABLE_COLLISION_REPORTING,
ENABLE_PICK_REPORTING |
Constructor Summary | |
SimpleTransformGroup()
Initializes the transform to the identity transform. |
|
SimpleTransformGroup(javax.vecmath.Vector3f initial)
The constructor can accept a Vector3f as an initial translation that will be applied even after the object has been reset. |
Method Summary | |
javax.vecmath.Vector3d |
get()
This method allows getting the translational component. |
void |
get(double[] array)
This method allows getting the matrix in array form. |
void |
get(javax.media.j3d.Transform3D transform)
This method allows getting the Transform. |
void |
move(javax.vecmath.Vector3d v)
This method adds to the transformational component of the transform. |
void |
move(javax.vecmath.Vector3f v)
This method adds to the transformational component of the transform. |
void |
reset()
This method returns the Transform to its original(default) state. |
void |
rotX(double angle)
This method applies a rotation(cumulative) about the x axis. |
void |
rotY(double angle)
This method applies a rotation(cumulative) about the y axis. |
void |
rotZ(double angle)
This method applies a rotation(cumulative) about the z axis. |
void |
scale(double scale)
This method applies a scaling(cumulative). |
void |
scale(javax.vecmath.Vector3d scale)
This method applies a non-uniform scale |
void |
set(double[] array)
This method allows setting of the matrix directly. |
void |
set(SimpleTransformGroup stg)
This method sets its internal Transform to the Transform of the argument. |
void |
set(javax.media.j3d.Transform3D transform)
Allows the setting of the matrix with a Transform3D. |
void |
set(javax.vecmath.Vector3d vector)
Allows setting the translational component without affecting the rotation. |
void |
set(javax.vecmath.Vector3d vec,
double x,
double y,
double z)
This method allows all of the transformational components and rotational components to be set absolutely. |
Methods inherited from class javax.media.j3d.TransformGroup |
cloneNode,
duplicateNode,
getTransform,
setTransform |
Methods inherited from class javax.media.j3d.Group |
addChild,
getAllChildren,
getAlternateCollisionTarget,
getChild,
getCollisionBounds,
insertChild,
moveTo,
numChildren,
removeChild,
setAlternateCollisionTarget,
setChild,
setCollisionBounds |
Methods inherited from class javax.media.j3d.Node |
cloneTree,
cloneTree,
cloneTree,
getBounds,
getBoundsAutoCompute,
getCollidable,
getLocalToVworld,
getLocalToVworld,
getParent,
getPickable,
setBounds,
setBoundsAutoCompute,
setCollidable,
setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability,
getCapability,
getUserData,
isCompiled,
isLive,
setCapability,
setUserData |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SimpleTransformGroup(javax.vecmath.Vector3f initial)
initial
- Is a Vector3f.public SimpleTransformGroup()
none
- Method Detail |
public void reset()
none
- public void set(SimpleTransformGroup stg)
SimpleTransformGroup
- the stg we want to be like.public void set(javax.media.j3d.Transform3D transform)
transform
- The transform to set this node to.public void set(javax.vecmath.Vector3d vec, double x, double y, double z)
This is useful when a device is controling a SimpleTransform and works in absolute coordinates.
Vector3d
- The translational component.double
- The x rotation.double
- The y rotation.double
- The z rotation.public void set(double[] array)
array
- An array of 16 doubles to be the new Transform3D.public void set(javax.vecmath.Vector3d vector)
vector
- the new translational component.public javax.vecmath.Vector3d get()
none
- public void get(double[] array)
array
- A double[16] to accept the matrix.public void get(javax.media.j3d.Transform3D transform)
transform
- The transform to receive the new transform.public void move(javax.vecmath.Vector3f v)
v
- The Vector3f object that describes the move.public void move(javax.vecmath.Vector3d v)
v
- The Vector3d object that describes the move.public void rotX(double angle)
angle
- The angle in radians to rotate by.public void rotY(double angle)
angle
- The angle in radians to rotate by.public void rotZ(double angle)
angle
- The angle in radians to rotate by.public void scale(double scale)
scale
- The scale to apply.public void scale(javax.vecmath.Vector3d scale)
scale
- The scale vector to apply.
|
NCSA Portfolio | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |