|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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
Group node that contains a transform. The TransformGroup node specifies a single spatial transformation, via a Transform3D object, that can position, orient, and scale all of its children.
The specified transformation must be affine. Further, if the TransformGroup node is used as an ancestor of a ViewPlatform node in the scene graph, the transformation must be congruent-only rotations, translations, and uniform scales are allowed in a direct path from a Locale to a ViewPlatform node.
Note: Even though arbitrary affine transformations are allowed, better performance will result if all matrices within a branch graph are congruent, containing only rotations translation, and uniform scale.
The effects of transformations in the scene graph are cumulative. The concatenation of the transformations of each TransformGroup in a direct path from the Locale to a Leaf node defines a composite model transformation (CMT) that takes points in that Leaf node's local coordinates and transforms them into Virtual World (Vworld) coordinates. This composite transformation is used to transform points, normals, and distances into Vworld coordinates. Points are transformed by the CMT. Normals are transformed by the inverse-transpose of the CMT. Distances are transformed by the scale of the CMT. In the case of a transformation containing a nonuniform scale or shear, the maximum scale value in any direction is used. This ensures, for example, that a transformed bounding sphere, which is specified as a point and a radius, continues to enclose all objects that are also transformed using a nonuniform scale.
Field Summary | |
static int |
ALLOW_TRANSFORM_READ
Specifies that the node allows access to its object's transform information. |
static int |
ALLOW_TRANSFORM_WRITE
Specifies that the node allows writing its object's transform information. |
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_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
Constructor Summary | |
TransformGroup()
Constructs and initializes a TransformGroup using an identity transform. |
|
TransformGroup(Transform3D t1)
Constructs and initializes a TransformGroup from the Transform passed. |
Method Summary | |
Node |
cloneNode(boolean forceDuplicate)
Creates a new instance of the node. |
void |
getTransform(Transform3D t1)
Copies the transform component of this TransformGroup into the passed transform object. |
void |
setTransform(Transform3D t1)
Sets the transform component of this TransformGroup to the value of the passed transform. |
Methods inherited from class javax.media.j3d.Group |
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds |
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, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ALLOW_TRANSFORM_READ
public static final int ALLOW_TRANSFORM_WRITE
Constructor Detail |
public TransformGroup()
public TransformGroup(Transform3D t1)
t1
- the transform3D object
BadTransformException
- if the transform is not affine.Method Detail |
public void setTransform(Transform3D t1)
t1
- the transform to be copied
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graph
BadTransformException
- if the transform is not affine.public void getTransform(Transform3D t1)
t1
- the transform object to be copied into
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic Node cloneNode(boolean forceDuplicate)
cloneTree
to duplicate the current node.
cloneNode
in class Group
forceDuplicate
- when set to true
, causes the
duplicateOnCloneTree
flag to be ignored. When
false
, the value of each node's
duplicateOnCloneTree
variable determines whether
NodeComponent data is duplicated or copied.Node.cloneTree()
,
Node.cloneNode(boolean)
,
Node.duplicateNode(javax.media.j3d.Node, boolean)
,
NodeComponent.setDuplicateOnCloneTree(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |