SOTRANSFORM(3iv)
π NAME π
SoTransform β general 3D geometric transformation node π
𧬠INHERITS FROM π§¬
SoBase > SoFieldContainer > SoNode > SoTransformation > SoTransform
π SYNOPSIS π
bestie you gotta pull the header in first, no cap:
#include <Inventor/nodes/SoTransform.h>
β¨ Fields from class SoTransform β¨
SoSFVec3ftranslationSoSFRotationrotationSoSFVec3fscaleFactorSoSFRotationscaleOrientationSoSFVec3fcenter
π Methods from class SoTransform π
SoTransform()void pointAt(const SbVec3f &fromPoint, const SbVec3f &toPoint)void getScaleSpaceMatrix(SbMatrix &mat, SbMatrix &inv) constvoid getRotationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) constvoid getTranslationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) constvoid multLeft(const SbMatrix &mat)void multRight(const SbMatrix &mat)void combineLeft(SoTransformation *nodeOnRight)void combineRight(SoTransformation *nodeOnLeft)void setMatrix(const SbMatrix &mat)void recenter(const SbVec3f &newCenter)static SoType getClassTypeId()
πΈ Methods from class SoNode πΈ
void setOverride(SbBool state)SbBool isOverride() constSoNode * copy(SbBool copyConnections = FALSE) constvirtual SbBool affectsState() conststatic SoNode * getByName(const SbName &name)static int getByName(const SbName &name, SoNodeList &list)
π¦ Methods from class SoFieldContainer π¦
void setToDefaults()SbBool hasDefaultValues() constSbBool fieldsAreEqual(const SoFieldContainer *fc) constvoid copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)SbBool set(const char *fieldDataString)void get(SbString &fieldDataString)virtual int getFields(SoFieldList &resultList) constvirtual SoField * getField(const SbName &fieldName) constSbBool getFieldName(const SoField *field, SbName &fieldName) constSbBool isNotifyEnabled() constSbBool enableNotify(SbBool flag)
π Methods from class SoBase π
void ref()void unref() constvoid unrefNoDelete() constvoid touch()virtual SoType getTypeId() constSbBool isOfType(SoType type) constvirtual void setName(const SbName &name)virtual SbName getName() const
π« DESCRIPTION π«
okay so picture this: this node defines a geometric 3D transformation, and it's built from three things, in this order:
- a (possibly) non-uniform scale about an arbitrary point,
- a rotation</> about an arbitrary point and axis,
- and a translation.
that's the vibe. BUT β and this is the plot twist β even though you can think of the transformations as being applied in that order, the matrices are actually premultiplied in the opposite order. π so, because of that, throughout this whole reference page the operations are listed in reverse order. it's giving "trust the process". iykyk. π«Ά
π FIELDS π
SoSFVec3ftranslationβ the translation vector, aka "where are we sliding to" π«SoSFRotationrotationβ the rotation spec, the whole spin situation πSoSFVec3fscaleFactorβ the scale factors, how big/smol we're going β¨SoSFRotationscaleOrientationβ the rotational orientation for the scale, i.e. which way the stretch is pointing πSoSFVec3fcenterβ the origin for both the scale and the rotation, the main character point π
π METHODS π
SoTransform()β creates a transformation node with default settings. fresh out the box, defaults only, iconic. β¨void pointAt(const SbVec3f &fromPoint, const SbVec3f &toPoint)β sets the node so it translates the origin tofromPointand rotates the negative z-axis(0,0,-1)so it lies on the vector going fromfromPointtotoPoint. it always tries to keep the "up" direction as the positive y-axis, unless that's impossible. and heads up bestie: all current field values in the node get replaced. π not a merge, a full swap.void getScaleSpaceMatrix(SbMatrix &mat, SbMatrix &inv) constvoid getRotationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) constvoid getTranslationSpaceMatrix(SbMatrix &mat, SbMatrix &inv) const
these three return composite matrices that transform from object space into each of the spaces after the scale, the rotation, or the translation. literally the backstage pass to each stage of the pipeline. ποΈ
void multLeft(const SbMatrix &mat)void multRight(const SbMatrix &mat)
convenience functions that fold the effects of a matrix transformation into the current transformation stored in this node. the first one premultiplies the transformation, the second one postmultiplies it. left vs right, choose your fighter. π
void combineLeft(SoTransformation *nodeOnRight)void combineRight(SoTransformation *nodeOnLeft)
same energy, but with another transformation node instead of a matrix β they combine that node's effects into the current transformation stored in this node. first one premultiplies, second one postmultiplies. π«Ά
void setMatrix(const SbMatrix &mat)β sets the fields in the node so they implement the transformation represented by the given matrix. > β οΈ warning bestie: invalid matrices (like singular ones) have undefined results. that's the "we don't know her" zone, don't go there. πvoid recenter(const SbVec3f &newCenter)β changes the center of the transformation to the given point without affecting the overall effect of the transformation. glow-up with zero side effects, slay. πstatic SoType getClassTypeId()β returns the type identifier for this class. the ID card. π
π₯ ACTION BEHAVIOR π₯
SoGLRenderAction,SoCallbackAction,SoGetBoundingBoxAction,SoRayPickActionβ accumulates the transformation into the current transformation. stacking it up, one on top of the other. β¨SoGetMatrixActionβ returns the matrix corresponding to the total transformation. the receipts. π§Ύ
π 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 π
go read these next, they're all in the group chat:
SoMatrixTransformSoResetTransformSoRotationSoRotationXYZSoScaleSoTransformManipSoTransformSeparatorSoTranslation
and that's the whole page bestie!! π this was the SoTransform(3IV) manual page β the header and the footer both just say SoTransform(3IV)(), so the source/version-and-date stamp down there is literally empty, no notes, no date, just vibes. πβ¨ periodt.
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms