| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.Node javax.media.j3d.Group javax.media.j3d.TransformGroup
All known Subclasses: org.jdesktop.j3d.utils.scenegraph.transparency.TransparencyOrderedGroup, org.jdesktop.j3d.examples.gears.Shaft, com.db.viewpoint.ViewPoint, org.jdesktop.j3d.examples.gears.Gear, ch.aecii.j3d.utils.ObservableTransformGroup,
TransformGroup | public class TransformGroup extends Group (Code) | | 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 | |
final public static int | ALLOW_TRANSFORM_READ Specifies that the node allows access to
its object's transform information. | final public static int | ALLOW_TRANSFORM_WRITE Specifies that the node allows writing
its object's transform information. |
Constructor Summary | |
public | TransformGroup() Constructs and initializes a TransformGroup using an
identity transform. | public | TransformGroup(Transform3D t1) Constructs and initializes a TransformGroup from
the Transform passed. |
Method Summary | |
public Node | cloneNode(boolean forceDuplicate) Creates a new instance of the node. | void | createRetained() Creates the retained mode TransformGroupRetained object that this
TransformGroup object will point to. | void | duplicateAttributes(Node originalNode, boolean forceDuplicate) Copies all TransformGroup information from
originalNode into
the current node. | public void | getTransform(Transform3D t1) Copies the transform component of this TransformGroup into
the passed transform object. | public void | setTransform(Transform3D t1) Sets the transform component of this TransformGroup to the value of
the passed transform. |
ALLOW_TRANSFORM_READ | final public static int ALLOW_TRANSFORM_READ(Code) | | Specifies that the node allows access to
its object's transform information.
|
ALLOW_TRANSFORM_WRITE | final public static int ALLOW_TRANSFORM_WRITE(Code) | | Specifies that the node allows writing
its object's transform information.
|
TransformGroup | public TransformGroup()(Code) | | Constructs and initializes a TransformGroup using an
identity transform.
|
TransformGroup | public TransformGroup(Transform3D t1)(Code) | | Constructs and initializes a TransformGroup from
the Transform passed.
Parameters: t1 - the transform3D object exception: BadTransformException - if the transform is not affine. |
cloneNode | public Node cloneNode(boolean forceDuplicate)(Code) | | Creates 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 |
createRetained | void createRetained()(Code) | | Creates the retained mode TransformGroupRetained object that this
TransformGroup object will point to.
|
duplicateAttributes | void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code) | | Copies all TransformGroup 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 |
getTransform | public void getTransform(Transform3D t1)(Code) | | Copies the transform component of this TransformGroup into
the passed transform object.
Parameters: t1 - the transform object to be copied into exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
setTransform | public void setTransform(Transform3D t1)(Code) | | Sets the transform component of this TransformGroup to the value of
the passed transform.
Parameters: t1 - the transform to be copied exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph exception: BadTransformException - if the transform is not affine. |
|
|