man SoTransform () - general 3D geometric transformation node

NAME

SoTransform - general 3D geometric transformation node

INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform

SYNOPSIS

#include <Inventor/nodes/SoTransform.h> Fields from class SoTransform: c } c } translation

c } c } rotation

c } c } scaleFactor

c } c } scaleOrientation

c } c } center Methods from class SoTransform: c } c } SoTransform()

c } c } pointAt(const SbVec3f &fromPoint, const SbVec3f &toPoint)

c } c } getScaleSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

c } c } getRotationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

c } c } getTranslationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

c } c } multLeft(const SbMatrix &mat)

c } c } multRight(const SbMatrix &mat)

c } c } combineLeft(SoTransformation *nodeOnRight)

c } c } combineRight(SoTransformation *nodeOnLeft)

c } c } setMatrix(const SbMatrix &mat)

c } c } recenter(const SbVec3f &newCenter)

c } c } getClassTypeId() Methods from class SoNode: c } c } setOverride(SbBool state)

c } c } isOverride() const

c } c } copy(SbBool copyConnections = FALSE) const

c } c } affectsState() const

c } c } getByName(const SbName &name)

c } c } getByName(const SbName &name, SoNodeList &list) Methods from class SoFieldContainer: c } c } setToDefaults()

c } c } hasDefaultValues() const

c } c } fieldsAreEqual(const SoFieldContainer *fc) const

c } c } copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)

c } c } set(const char *fieldDataString)

c } c } get(SbString &fieldDataString)

c } c } getFields(SoFieldList &resultList) const

c } c } getField(const SbName &fieldName) const

c } c } getFieldName(const SoField *field, SbName &fieldName) const

c } c } isNotifyEnabled() const

c } c } enableNotify(SbBool flag) Methods from class SoBase: c } c } ref()

c } c } unref() const

c } c } unrefNoDelete() const

c } c } touch()

c } c } getTypeId() const

c } c } isOfType(SoType type) const

c } c } setName(const SbName &name)

c } c } getName() const

DESCRIPTION

This node defines a geometric 3D transformation consisting of (in order) a (possibly) non-uniform scale about an arbitrary point, a rotation about an arbitrary point and axis, and a translation. (While the transformations can be thought of as being applied in that order, matrices are actually premultiplied in the opposite order. Therefore, the operations are listed in the reverse order throughout this reference page.)

FIELDS

c } c } translation

Translation vector. c } c } rotation

Rotation specification. c } c } scaleFactor

Scale factors. c } c } scaleOrientation

Rotational orientation for scale. c } c } center

Origin for scale and rotation.

METHODS

c } c } SoTransform()

Creates a transformation node with default settings. c } c } pointAt(const SbVec3f &fromPoint, const SbVec3f &toPoint)

Sets the node to translate the origin to the fromPoint and rotate the negative z-axis (0,0,-1) to lie on the vector from fromPoint to toPoint. This always tries to keep the "up" direction the positive y-axis, unless that is impossible. All current field values in the node are replaced. c } c } getScaleSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

c } c } getRotationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

c } c } getTranslationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const

These return composite matrices that transform from object space to each of the spaces after the scale, rotation, or translation. c } c } multLeft(const SbMatrix &mat)

c } c } multRight(const SbMatrix &mat)

These are convenience functions that combine the effects of a matrix transformation into the current transformation stored in this node. The first method premultiplies the transformation and the second postmultiplies it. c } c } combineLeft(SoTransformation *nodeOnRight)

c } c } combineRight(SoTransformation *nodeOnLeft)

These are convenience functions that combine the effects of another transformation node into the current transformation stored in this node. The first method premultiplies the transformation and the second postmultiplies it. c } c } setMatrix(const SbMatrix &mat)

Sets the fields in the node to implement the transformation represented by the given matrix. Note that invalid matrices (such as singular ones) have undefined results. c } c } recenter(const SbVec3f &newCenter)

Changes the center of the transformation to the given point without affecting the overall effect of the transformation. c } c } getClassTypeId()

Returns type identifier for this class.

ACTION BEHAVIOR

SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoRayPickAction

Accumulates transformation into the current transformation. SoGetMatrixAction

Returns the matrix corresponding to the total transformation.

FILE FORMAT/DEFAULTS

Transform {
translation	0 0 0
rotation	0 0 1  0
scaleFactor	1 1 1
scaleOrientation	0 0 1  0
center	0 0 0
}

SEE ALSO

SoMatrixTransform, SoResetTransform, SoRotation, SoRotationXYZ, SoScale, SoTransformManip, SoTransformSeparator, SoTranslation