H3D::Transform Class Reference
[X3D node classes.]

The Transform node is a grouping node that defines a coordinate system for its children that is relative to the coordinate systems of its ancestors. More...

#include <H3D/Transform.h>

Inheritance diagram for H3D::Transform:

Inheritance graph

List of all members.

Classes

class  Matrix
 Specialize the SFMatrix4f to update the matrix from the fields in the Transform node. More...

Public Member Functions

 Transform (Inst< MFChild > _addChildren=0, Inst< MFChild > _removeChildren=0, Inst< SFVec3f > _center=0, Inst< MFChild > _children=0, Inst< SFNode > _metadata=0, Inst< SFRotation > _rotation=0, Inst< SFVec3f > _scale=0, Inst< SFRotation > _scaleOrientation=0, Inst< SFVec3f > _translation=0, Inst< SFBound > _bound=0, Inst< SFVec3f > _bboxCenter=0, Inst< SFVec3f > _bboxSize=0, Inst< SFTransformedBound > _transformedBound=0, Inst< Matrix > _matrix=0, Inst< SFMatrix4f > _accumulatedForward=0, Inst< SFMatrix4f > _accumulatedInverse=0)
 Constructor.
virtual void render ()
 Render the children.

Public Attributes

auto_ptr< SFVec3fcenter
 The center field specifies a translation offset from the origin of the local coordinate system that the rotation and scaling should occur around.
auto_ptr< SFRotationrotation
 The rotation field specifies an arbitrary rotation.
auto_ptr< SFVec3fscale
 The scale field specifies a non-uniform scale of the coordinate system.
auto_ptr< SFRotationscaleOrientation
 The scaleOrientation specifies a rotation of the coordinate system before the scale (to specify scales in arbitrary orientations).
auto_ptr< SFVec3ftranslation
 Specifies a translation to the coordinate system.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

The Transform node is a grouping node that defines a coordinate system for its children that is relative to the coordinate systems of its ancestors.

The bboxCenter and bboxSize fields specify a bounding box that encloses the children of the Transform node. This is a hint that may be used for optimization purposes. The results are undefined if the specified bounding box is smaller than the actual bounding box of the children at any time. A default bboxSize value, (-1, -1, -1), implies that the bounding box is not specified and, if needed, shall be calculated by the browser. The bounding box shall be large enough at all times to enclose the union of the group's children's bounding boxes; it shall not include any transformations performed by the group itself (i.e., the bounding box is defined in the local coordinate system of the children). The results are undefined if the specified bounding box is smaller than the true bounding box of the group.

The translation, rotation, scale, scaleOrientation and center fields define a geometric 3D transformation consisting of (in order):

The center field specifies a translation offset from the origin of the local coordinate system (0,0,0). The rotation field specifies a rotation of the coordinate system. The scale field specifies a non-uniform scale of the coordinate system. scale values may have any value: positive, negative (indicating a reflection), or zero. A value of zero indicates that any child geometry shall not be displayed. The scaleOrientation specifies a rotation of the coordinate system before the scale (to specify scales in arbitrary orientations). The scaleOrientation applies only to the scale operation. The translation field specifies a translation to the coordinate system.

Given a 3-dimensional point P and Transform node, P is transformed into point P' in its parent's coordinate system by a series of intermediate transformations. In matrix transformation notation, where C (center), SR (scaleOrientation), T (translation), R (rotation), and S (scale) are the equivalent transformation matrices,

P' = T * C * R * SR * S * -SR * -C * P

Internal routes:
Transform.dot

Member Data Documentation

The center field specifies a translation offset from the origin of the local coordinate system that the rotation and scaling should occur around.

Access type: inputOutput
Default value: Vec3f( 0, 0, 0 )

Transform_center.dot

Referenced by Transform().

The rotation field specifies an arbitrary rotation.

Access type: inputOutput
Default value: Rotation( 0, 0, 1, 0 )

Transform_rotation.dot

Referenced by Transform().

The scale field specifies a non-uniform scale of the coordinate system.

scale values may have any value: positive, negative (indicating a reflection), or zero. A value of zero indicates that any child geometry shall not be displayed. The rotation field specifies an arbitrary rotation.

Access type: inputOutput
Default value: Vec3f( 1, 1, 1 )

Transform_scale.dot

Referenced by render(), and Transform().

The scaleOrientation specifies a rotation of the coordinate system before the scale (to specify scales in arbitrary orientations).

Access type: inputOutput
Default value: Rotation( 0, 0, 1, 0 )

Transform_scaleOrientation.dot

Referenced by Transform().

Specifies a translation to the coordinate system.

Access type: inputOutput
Default value: Vec3f( 0, 0, 0 )

Transform_translation.dot

Referenced by Transform().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:31:18 2008 for H3D API by  doxygen 1.5.7