SoTransform — general 3D geometric transformation node
Contents
Action Behavior
SoGLRenderAction,SoCallbackAction,SoGetBoundingBoxAction,SoRayPickAction
Accumulates transformation into the current transformation.
SoGetMatrixAction
Returns the matrix corresponding to the total transformation.
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
SoSFVec3ftranslation
Translation vector.
SoSFRotationrotation
Rotation specification.
SoSFVec3fscaleFactor
Scale factors.
SoSFRotationscaleOrientation
Rotational orientation for scale.
SoSFVec3fcenter
Origin for scale and rotation.
File Format/Defaults
Transform{translation000rotation0010scaleFactor111scaleOrientation0010center000}Inherits From
SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform
Methods
SoTransform()
Creates a transformation node with default settings.
voidpointAt(constSbVec3f&fromPoint,constSbVec3f&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.
voidgetScaleSpaceMatrix(SbMatrix&mat,SbMatrix&inv)constvoidgetRotationSpaceMatrix(SbMatrix&mat,SbMatrix&inv)constvoidgetTranslationSpaceMatrix(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.
voidmultLeft(constSbMatrix&mat)voidmultRight(constSbMatrix&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.
voidcombineLeft(SoTransformation*nodeOnRight)voidcombineRight(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.
voidsetMatrix(constSbMatrix&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.
voidrecenter(constSbVec3f&newCenter)
Changes the center of the transformation to the given point without affecting the overall effect of
the transformation.
staticSoTypegetClassTypeId()
Returns type identifier for this class.
Name
SoTransform — general 3D geometric transformation node
See Also
SoMatrixTransform,SoResetTransform,SoRotation,SoRotationXYZ,SoScale,SoTransformManip,SoTransformSeparator,SoTranslationSoTransform(3IV)()
Synopsis
#include<Inventor/nodes/SoTransform.h>
Fields from class SoTransform:
SoSFVec3ftranslationSoSFRotationrotationSoSFVec3fscaleFactorSoSFRotationscaleOrientationSoSFVec3fcenter
Methods from class SoTransform:
SoTransform()voidpointAt(constSbVec3f&fromPoint,constSbVec3f&toPoint)voidgetScaleSpaceMatrix(SbMatrix&mat,SbMatrix&inv)constvoidgetRotationSpaceMatrix(SbMatrix&mat,SbMatrix&inv)constvoidgetTranslationSpaceMatrix(SbMatrix&mat,SbMatrix&inv)constvoidmultLeft(constSbMatrix&mat)voidmultRight(constSbMatrix&mat)voidcombineLeft(SoTransformation*nodeOnRight)voidcombineRight(SoTransformation*nodeOnLeft)voidsetMatrix(constSbMatrix&mat)voidrecenter(constSbVec3f&newCenter)staticSoTypegetClassTypeId()
Methods from class SoNode:
voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)
Methods from class SoFieldContainer:
voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)
Methods from class SoBase:
voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const