SOACTION(3iv)
π SoAction β the abstract base class of literally every action π
okay bestie, sit down, hydrate, because this is the mother of all actions. This page lives in manual section 3IV (yes, the Inventor vibes, iykyk) β¨
πΈ NAME πΈ
SoAction β abstract base class for all actions π
π¦ INHERITS FROM π¦
SoAction
β¨ SYNOPSIS β¨
#include <Inventor/actions/SoAction.h>
Methods from class SoAction:
virtual ~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 π
SoAction is the abstract base class for all actions, no cap. Classes derived from SoAction define the operations that get applied at each node you bump into while traversing a scene graph π§
The function that actually gets called to implement the action for a particular node type? Yeah, that's decided by a lookup table in the global database. Very main character of it tbh π
π METHODS π
virtual ~SoAction()β the destructor, periodt.virtual void apply(SoNode *node)virtual void apply(SoPath *path)virtual void apply(const SoPathList &pathList, SbBool obeysRules = FALSE)
Kicks off an action on the graph, and that graph is defined by either a node, a path, or a whole list of paths π«Ά
You can pass TRUE for the obeysRules flag if the path list you're handing over has these 4 properties:
- All paths have the same head node
- Paths are sorted in traversal order
- If one path ends at node
A, no other path continues throughA - No two paths are the same
And bestie, these rules will be obeyed by path lists returned by picking and by searches for non-group nodes. So like, they're not random, they're the real deal π
static SoType getClassTypeId()β returns the type identifier for this class.virtual SoType getTypeId()β returns the type identifier for a specific instance (yes, there's a difference, don't @ me).virtual SbBool isOfType(SoType type)β returnsTRUEif this instance is of the type specified in type, or is derived from that type. Otherwise it returnsFALSE. For example:
actionPtr->isOfType(SoGetMatrixAction::getClassTypeId())
returns TRUE if actionPtr is an instance of SoGetMatrixAction or one of its subclasses π
virtual void invalidateState()β invalidates the current traversal state in the action, forcing it to be recreated the next time the action is applied. Lowkey this is typically unnecessary in most applications, so don't stress about it π
π₯ SEE ALSO π₯
SoNode, SoPath, SoPathList, SoCallbackAction, SoGLRenderAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction, SoPickAction, SoRayPickAction, SoSearchAction, SoWriteAction
go read the friends of this page too, they're all iconic in their own way π
okay that's the whole page, you ate it, you understood it, I'm so proud π₯Ή this was SoAction, from the 3IV manual, and the page itself was stamped out with that classic source/version tag and its date β consider this your cute lil sign-off, mwah πβ¨
π¦ 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