SOGETMATRIXACTION(3iv)
π SoGetMatrixAction π
okay bestie, we're reading the SoGetMatrixAction(3IV) manual page together and honestly? it's giving math girlie main character energy. no cap. let's go π¦
β¨ NAME β¨
SoGetMatrixAction β computes transformation matrix for subgraph π
πΈ INHERITS FROM πΈ
SoAction > SoGetMatrixAction
(yes she's a SoAction descendant, we love a legacy queen π)
β¨ SYNOPSIS β¨
#include <Inventor/actions/SoGetMatrixAction.h>
Methods from class SoGetMatrixAction:
SoGetMatrixAction(const SbViewportRegion
&newRegion)
void setViewportRegion(const SbViewportRegion
&newRegion)
const SbViewportRegion & getViewportRegion() const
SbMatrix & getMatrix()
SbMatrix & getInverse()
SbMatrix & getTextureMatrix()
SbMatrix & getTextureInverse()
Methods from class SoAction:
virtual void apply(SoNode *node)
virtual void apply(SoPath *path)
virtual void apply(const SoPathList &pathList, SbBool obeysRules =
FALSE)
static SoType getClassTypeId()
virtual SoType getTypeId()
virtual SbBool isOfType(SoType type)
virtual void invalidateState()
β¨ DESCRIPTION β¨
So this action computes transformation matrices for a given subgraph. She hands you the cumulative transformation matrix AND its inverse, plus a cumulative texture transformation matrix AND its inverse. four matrices. iconic. π
Now here's the thing that makes her lowkey different from every other action: she does NOT traverse downwards from groups. When you apply her to a node, she computes the matrix for just that node. (Which, ngl, makes sense for transformation nodes, but for other nodes? not really, bestie, it's giving "why are we here". π)
She's way more useful when you apply her to a path. When applied to a path, she gathers up the transformation info for all the nodes in the path and those that affect nodes in the path β but then she STOPS when she hits the last node in the path. she does not traverse downwards from it like other actions (such as rendering) do. and honestly? this behavior makes the most sense for this action. periodt. π
β¨ METHODS β¨
SoGetMatrixAction(const SbViewportRegion &newRegion)β the constructor, and it takes the viewport region to use for picking. now listen, even though the matrix computation may not involve a window per se, some nodes genuinely need this info to figure out their placement. so give her the region, she'll handle it. π«Άvoid setViewportRegion(const SbViewportRegion &newRegion)const SbViewportRegion & getViewportRegion() constβ sets / returns the current viewport region to use for the action. getter and setter, a matched pair, we love to see it. β¨SbMatrix & getMatrix()SbMatrix & getInverse()β returns the cumulative transformation matrix and its inverse.
β οΈ WARNING: the matrices returned by these routines should not be changed (unless you are implementing your own transformation nodes). do not touch. hands off. π
SbMatrix & getTextureMatrix()SbMatrix & getTextureInverse()β returns the cumulative texture transformation matrix and its inverse.
β οΈ WARNING: same deal, bestie β the matrices returned by these routines should not be changed (unless you are implementing your own transformation nodes). leave them alone fr fr. π
π SEE ALSO π
SoGetBoundingBoxAction
and that's the whole page, mwah π she's SoGetMatrixAction(3IV)(), the manual page, dropping as ever β go forth and compute those matrices responsibly, bestie, and remember: look, don't touch those returned matrices πβ¨
π¦ 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