SoCallbackAction(3)
π¦ SoCallbackAction π¦
okay so you found the manpage for SoCallbackAction, from the Coin library (yes, the section 3 kind, a C++ API page) β and honestly? she's a baddie. sit down, grab a snack, we're doing this properly.
π NAME
SoCallbackAction β the class that invokes callbacks at specific nodes. that's it, that's the whole gig, and she does it beautifully.
β¨ SYNOPSIS β¨
#include <Inventor/actions/SoCallbackAction.h>
Inherits SoAction.
Inherited by SoVectorizeAction.
π Public Types π
enum Response { CONTINUE, ABORT, PRUNE }typedef Response SoCallbackActionCB(void *userdata, SoCallbackAction *action, const SoNode *node)
π Public Types inherited from SoAction
enum AppliedCode { NODE = 0, PATH = 1, PATH_LIST = 2 }enum PathCode { NO_PATH = 0, IN_PATH = 1, BELOW_PATH = 2, OFF_PATH = 3 }
πΈ Public Member Functions πΈ
virtual SoType getTypeId (void) constSoCallbackAction (void)SoCallbackAction (const SbViewportRegion &vp)virtual ~SoCallbackAction (void)void setViewportRegion (const SbViewportRegion &vp)void addPreCallback (const SoType type, SoCallbackActionCB *cb, void *userdata)void addPostCallback (const SoType type, SoCallbackActionCB *cb, void *userdata)void addPreTailCallback (SoCallbackActionCB *cb, void *userdata)void addPostTailCallback (SoCallbackActionCB *cb, void *userdata)void addTriangleCallback (const SoType type, SoTriangleCB *cb, void *userdata)void addLineSegmentCallback (const SoType type, SoLineSegmentCB *cb, void *userdata)void addPointCallback (const SoType type, SoPointCB *cb, void *userdata)SoDecimationTypeElement::Type getDecimationType (void) constfloat getDecimationPercentage (void) constfloat getComplexity (void) constSoComplexity::Type getComplexityType (void) constint32_t getNumCoordinates (void) constconst SbVec3f & getCoordinate3 (const int index) constconst SbVec4f & getCoordinate4 (const int index) constSoDrawStyle::Style getDrawStyle (void) constunsigned short getLinePattern (void) constfloat getLineWidth (void) constfloat getPointSize (void) constconst SbName & getFontName (void) constfloat getFontSize (void) constSoLightModel::Model getLightModel (void) constconst SbVec3f & getLightAttenuation (void) constvoid getMaterial (SbColor &ambient, SbColor &diffuse, SbColor &specular, SbColor &emission, float &shininess, float &transparency, const int index=0) constSoMaterialBinding::Binding getMaterialBinding (void) constuint32_t getNumNormals (void) constconst SbVec3f & getNormal (const int index) constSoNormalBinding::Binding getNormalBinding (void) constint32_t getNumProfileCoordinates (void) constconst SbVec2f & getProfileCoordinate2 (const int index) constconst SbVec3f & getProfileCoordinate3 (const int index) constconst SoNodeList & getProfile (void) constSoShapeHints::VertexOrdering getVertexOrdering (void) constSoShapeHints::ShapeType getShapeType (void) constSoShapeHints::FaceType getFaceType (void) constfloat getCreaseAngle (void) constint32_t getNumTextureCoordinates (void) constconst SbVec2f & getTextureCoordinate2 (const int index) constconst SbVec3f & getTextureCoordinate3 (const int index) constconst SbVec4f & getTextureCoordinate4 (const int index) constSoTextureCoordinateBinding::Binding getTextureCoordinateBinding (void) constconst SbColor & getTextureBlendColor (void) constconst unsigned char * getTextureImage (SbVec2s &size, int &numcomps) constconst unsigned char * getTextureImage (SbVec3s &size, int &numcomps) constconst SbMatrix & getTextureMatrix (void) constSoTexture2::Model getTextureModel (void) constSoTexture2::Wrap getTextureWrapS (void) constSoTexture2::Wrap getTextureWrapT (void) constSoTexture2::Wrap getTextureWrapR (void) constconst SbMatrix & getModelMatrix (void) constSoUnits::Units getUnits (void) constfloat getFocalDistance (void) constconst SbMatrix & getProjectionMatrix (void) constconst SbMatrix & getViewingMatrix (void) constconst SbViewVolume & getViewVolume (void) constconst SbViewportRegion & getViewportRegion (void) constSoPickStyle::Style getPickStyle (void) constint32_t getSwitch (void) constResponse getCurrentResponse (void) constvoid invokePreCallbacks (const SoNode *const node)void invokePostCallbacks (const SoNode *const node)void invokeTriangleCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3)void invokeLineSegmentCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)void invokePointCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v)SbBool shouldGeneratePrimitives (const SoShape *shape) constvirtual SoNode * getCurPathTail (void)void setCurrentNode (SoNode *const node)void setCallbackAll (SbBool callbackall)SbBool isCallbackAll (void) const
π Public Member Functions inherited from SoAction
virtual ~SoAction (void)virtual SbBool isOfType (SoType type) constvirtual void apply (SoNode *root)virtual void apply (SoPath *path)virtual void apply (const SoPathList &pathlist, SbBool obeysrules=FALSE)void apply (SoAction *beingApplied)virtual void invalidateState (void)AppliedCode getWhatAppliedTo (void) constSoNode * getNodeAppliedTo (void) constSoPath * getPathAppliedTo (void) constconst SoPathList * getPathListAppliedTo (void) constconst SoPathList * getOriginalPathListAppliedTo (void) constSbBool isLastPathListAppliedTo (void) constPathCode getPathCode (int &numindices, const int *&indices)void traverse (SoNode *const node)SbBool hasTerminated (void) constconst SoPath * getCurPath (void)SoState * getState (void) constPathCode getCurPathCode (void) constvoid usePathCode (int &numindices, const int *&indices)void pushCurPath (const int childindex, SoNode *node=NULL)void popCurPath (const PathCode prevpathcode)void pushCurPath (void)void popPushCurPath (const int childindex, SoNode *node=NULL)void popCurPath (void)void switchToPathTraversal (SoPath *path)void switchToNodeTraversal (SoNode *node)
β Static Public Member Functions β
static SoType getClassTypeId (void)static void addMethod (const SoType type, SoActionMethod method)static void enableElement (const SoType type, const int stackindex)static void initClass (void)
π Static Public Member Functions inherited from SoAction
static void initClass (void)static void initClasses (void)static SoType getClassTypeId (void)static void nullAction (SoAction *action, SoNode *node)
π«Ά Protected Member Functions π«Ά
virtual const SoEnabledElementsList & getEnabledElements (void) constvirtual void beginTraversal (SoNode *node)
π Protected Member Functions inherited from SoAction
SoAction (void)virtual void endTraversal (SoNode *node)void setTerminated (const SbBool flag)virtual SbBool shouldCompactPathList (void) const
π§ Static Protected Member Functions π§
static SoEnabledElementsList * getClassEnabledElements (void)static SoActionMethodList * getClassActionMethods (void)
π Static Protected Member Functions inherited from SoAction
static SoEnabledElementsList * getClassEnabledElements (void)static SoActionMethodList * getClassActionMethods (void)
π Additional Inherited Members π
π Protected Attributes inherited from SoAction
SoState * stateSoActionMethodList * traversalMethods
π Detailed Description π
SoCallbackAction invokes callbacks at specific nodes. that's the whole personality, and honestly? iconic.
okay so here's the tea: this action has mechanisms for tracking traversal position and traversal state. and because you can also pass geometry primitives to the callback actions that you (yes, YOU) set up, this makes it, like, pretty straightforward to extract the geometry of a scene graph. no cap.
the way that you should be able to use this action for most of your "simple" traversal needs β instead of cooking up your own code β because SoCallbackAction is rather flexible. she said "I contain multitudes" π
.
a super common use of this action is to extract geometry of non-primitive shapes as triangles. obsessed.
and here's a full-fledged example that demonstrates exactly that, on a scene graph with two spheres. π
#include <Inventor/SoDB.h>
#include <Inventor/SoPrimitiveVertex.h>
#include <Inventor/actions/SoCallbackAction.h>
#include <Inventor/nodes/SoCoordinate3.h>
#include <Inventor/nodes/SoIndexedFaceSet.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoShape.h>
#include <Inventor/nodes/SoSphere.h>
#include <Inventor/nodes/SoTranslation.h>
static SoCoordinate3 * coord3 = NULL;
static SoIndexedFaceSet * ifs = NULL;
static int coord3idx = 0;
static void
triangle_cb(void * userdata, SoCallbackAction * action,
const SoPrimitiveVertex * v1,
const SoPrimitiveVertex * v2,
const SoPrimitiveVertex * v3)
{
const SbVec3f vtx[] = { v1->getPoint(), v2->getPoint(), v3->getPoint() };
const SbMatrix mm = action->getModelMatrix();
SbVec3f vx[3];
for (int j=0; j < 3; j++) { mm.multVecMatrix(vtx[j], vx[j]); }
// (This is sub-optimal -- should scan for the same vertex
// coordinates already being present in the SoCoordinate3
// node. We'll get lots of duplicate coordinates from this.)
coord3->point.setNum(coord3->point.getNum() + 3);
coord3->point.setValues(coord3idx, 3, vx);
int32_t indices[] = { coord3idx, coord3idx + 1, coord3idx + 2, -1 };
coord3idx += 3;
int oldsize = ifs->coordIndex.getNum();
ifs->coordIndex.setNum(oldsize + 4);
ifs->coordIndex.setValues(oldsize, 4, indices);
// (Note that it would likely be desirable to grab normal vectors,
// materials and / or texture coordinates in a real-world
// application. How to do this is not shown by the above code,
// but it is not much different from the extraction of vertex
// coordinates.)
}
int
main(void)
{
SoDB::init();
SoSeparator * root = new SoSeparator;
root->addChild(new SoSphere);
SoTranslation * trans = new SoTranslation;
trans->translation.setValue(10, 0, 0);
root->addChild(trans);
SoSphere * ss = new SoSphere;
ss->radius = 3;
root->addChild(ss);
root->ref();
coord3 = new SoCoordinate3;
coord3->point.setNum(0);
ifs = new SoIndexedFaceSet;
ifs->coordIndex.setNum(0);
SoCallbackAction ca;
ca.addTriangleCallback(SoShape::getClassTypeId(), triangle_cb, NULL);
ca.apply(root);
root->unref();
// [the generated SoCoordinate3 and SoIndexedFaceSet nodes would now
// typically be used in a scene graph in a viewer, or written to disk
// or something]
return 0;
}
β to be continued, bestieβ¦ β
π Member Typedef Documentation
β¨ SoCallbackActionCB
typedef Response SoCallbackAction::SoCallbackActionCB(void *userdata,
SoCallbackAction *action, const SoNode *node)
ok so if you're gonna write a callback function, bestie, it HAS to be this type, no exceptions. node is sitting right there at the current traversal point in the scene graph. that's the whole vibe. π¦
πΈ Member Enumeration Documentation
β¨ enum SoCallbackAction::Response
these are the response values for a callback function. pick your fighter:
CONTINUEβ keep it moving, continue traversal as usual. nothing to see here πABORTβ nope, abort traversal immediately. no other callbacks are called after this has been returned. it's giving hard stop πPRUNEβ don't do traversal of neither the current node (if returning from a pre-traversal callback) nor its children.
lowkey important: ifPRUNEis returned from a pre-callback, the post-callbacks will still be called. if it's returned from a post-callback, the behaviour will be the same as for returningCONTINUE. iykyk π§
π Constructor & Destructor Documentation
β¨ SoCallbackAction::SoCallbackAction(void)
default constructor. will set the viewport to a standard viewport with size 640x512. cute, standard, done. πΈ
β¨ SoCallbackAction::SoCallbackAction(const SbViewportRegion & vp)
constructor which lets you specify the viewport. main character energy only, bestie π
this constructor is an extension versus the Open Inventor API.
β¨ SoCallbackAction::~SoCallbackAction(void) [virtual]
destructor. bye bestie π¦
π Member Function Documentation
β¨ SoType SoCallbackAction::getTypeId(void) const [virtual]
returns the type identification of an object derived from a class inheriting SoAction. this is what powers runtime type checking and "downward" casting.
- Implements
SoAction. - Reimplemented in
SoVectorizeAction, andSoVectorizePSAction.
β¨ SoType SoCallbackAction::getClassTypeId(void) [static]
this static method returns the SoType object associated with objects of this class.
β¨ void SoCallbackAction::addMethod(const SoType type, SoActionMethod method) [static]
this API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
β¨ void SoCallbackAction::enableElement(const SoType type, const int stackindex) [static]
this API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
β¨ const SoEnabledElementsList & SoCallbackAction::getEnabledElements(void) const [protected], [virtual]
returns list of enabled elements.
- Reimplemented from
SoAction. - Reimplemented in
SoVectorizeAction, andSoVectorizePSAction.
β¨ SoEnabledElementsList * SoCallbackAction::getClassEnabledElements(void) [static], [protected]
returns list of enabled elements for this class. so here's the lore: the enabledElements and methods variables are protected in the original OIV API. this is not such a good idea, since exposed static class member variables is a major grievance with regard to Win32 DLLs. this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. π
β¨ SoActionMethodList * SoCallbackAction::getClassActionMethods(void) [static], [protected]
returns list of action methods for this class. same story as above, fr fr: the enabledElements and methods variables are protected in the original OIV API, which is not such a good idea, since exposed static class member variables is a major grievance with regard to Win32 DLLs. this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
β¨ void SoCallbackAction::initClass(void) [static]
initializes the runtime type system for this class, and sets up the enabled elements and action method list. the whole setup? slay. β¨
β¨ void SoCallbackAction::setViewportRegion(const SbViewportRegion & vp)
sets the viewport region for this action. when set, the viewport element is initialized right before a traversal starts, making it the current viewport.
this method is an extension versus the Open Inventor API.
β¨ void SoCallbackAction::addPreCallback(const SoType type, SoCallbackActionCB * cb, void * userdata)
set a function cb to call before every node of type is traversed. cb will be called with userdata. pre-game hype, basically π«Ά
β¨ void SoCallbackAction::addPostCallback(const SoType type, SoCallbackActionCB * cb, void * userdata)
set a function cb to call after every node of type has been traversed. cb will be called with userdata.
β¨ void SoCallbackAction::addPreTailCallback(SoCallbackActionCB * cb, void * userdata)
set a function cb to call before the tail of a path is traversed. cb will be called with userdata.
β¨ void SoCallbackAction::addPostTailCallback(SoCallbackActionCB * cb, void * userdata)
set a function cb to call after the tail of a path has been traversed. cb will be called with userdata.
β¨ void SoCallbackAction::addTriangleCallback(const SoType type, SoTriangleCB * cb, void * userdata)
set a function cb to call when traversing a node of type which generates triangle primitives for rendering. cb will be called with userdata.
β¨ void SoCallbackAction::addLineSegmentCallback(const SoType type, SoLineSegmentCB * cb, void * userdata)
set a function cb to call when traversing a node of type which generates line primitives for rendering. cb will be called with userdata.
β¨ void SoCallbackAction::addPointCallback(const SoType type, SoPointCB * cb, void * userdata)
set a function cb to call when traversing a node of type which generates single point primitives for rendering. cb will be called with userdata.
β¨ SoDecimationTypeElement::Type SoCallbackAction::getDecimationType(void) const
returns current decimation type setting.
β¨ float SoCallbackAction::getDecimationPercentage(void) const
returns current decimation percentage setting.
β¨ float SoCallbackAction::getComplexity(void) const
returns current complexity setting.
β¨ SoComplexity::Type SoCallbackAction::getComplexityType(void) const
returns current complexity type setting.
β¨ int32_t SoCallbackAction::getNumCoordinates(void) const
returns current number of coordinates in the state.
β¨ const SbVec3f & SoCallbackAction::getCoordinate3(const int index) const
returns a coordinate triplet from the current state pool of coordinates.
β¨ const SbVec4f & SoCallbackAction::getCoordinate4(const int index) const
returns a coordinate quadruplet from the current state pool of coordinates.
β¨ SoDrawStyle::Style SoCallbackAction::getDrawStyle(void) const
returns current draw style setting.
β¨ unsigned short SoCallbackAction::getLinePattern(void) const
returns current line pattern setting.
β¨ float SoCallbackAction::getLineWidth(void) const
returns current line width setting.
β¨ float SoCallbackAction::getPointSize(void) const
returns current point size setting.
β¨ const SbName & SoCallbackAction::getFontName(void) const
returns current font name setting.
β¨ float SoCallbackAction::getFontSize(void) const
returns current font size setting.
β¨ SoLightModel::Model SoCallbackAction::getLightModel(void) const
returns current light model setting.
β¨ const SbVec3f & SoCallbackAction::getLightAttenuation(void) const
returns current light attenuation setting.
β¨ void SoCallbackAction::getMaterial(SbColor & ambient, SbColor & diffuse, SbColor & specular, SbColor & emission, float & shininess, float & transparency, const int index = 0) const
returns current material settings.
β¨ SoMaterialBinding::Binding SoCallbackAction::getMaterialBinding(void) const
returns current material binding setting.
β¨ uint32_t SoCallbackAction::getNumNormals(void) const
returns current number of normals in the state.
β¨ const SbVec3f & SoCallbackAction::getNormal(const int index) const
returns the normal vectors at index from the current state.
β¨ SoNormalBinding::Binding SoCallbackAction::getNormalBinding(void) const
returns current normal binding setting.
β¨ int32_t SoCallbackAction::getNumProfileCoordinates(void) const
returns current number of profile coordinates in the state.
β¨ const SbVec2f & SoCallbackAction::getProfileCoordinate2(const int index) const
returns current number of SbVec2f profile coordinates in the state.
β¨ const SbVec3f & SoCallbackAction::getProfileCoordinate3(const int index) const
returns current number of SbVec3f profile coordinates in the state.
β¨ const SoNodeList & SoCallbackAction::getProfile(void) const
returns current list of profile nodes.
β¨ SoShapeHints::VertexOrdering SoCallbackAction::getVertexOrdering(void) const
returns current vertex ordering shape hint setting.
heads up bestie π«Ά please note that this is the vertex ordering set by theSoShapeHintsnode. if you want to find the vertex ordering for VRML nodes you'll need to read this directly from theccwfield in those nodes.
β¨ SoShapeHints::ShapeType SoCallbackAction::getShapeType(void) const
returns current shape type hint setting.
same deal, please note that this is the shape type set by theSoShapeHintsnode. if you want to find the shape type for VRML nodes you'll need to read this directly from thesolidfield in those nodes.
β¨ SoShapeHints::FaceType SoCallbackAction::getFaceType(void) const
returns current face type hint setting.
and again: please note that this is the face type set by theSoShapeHintsnode. if you want to find the face type for VRML nodes you'll need to read this directly from theconvexfield in those nodes.
β¨ float SoCallbackAction::getCreaseAngle(void) const
returns current crease angle setting. please note that this is the crease angle value set by the SoShapeHints node. if you want to find the crease angle for VRML nodes you'll need to read this directly from the creaseAngle field in those nodes.
β¨ int32_t SoCallbackAction::getNumTextureCoordinates(void) const
returns current number of texture coordinates in the traversal state.
β¨ const SbVec2f & SoCallbackAction::getTextureCoordinate2(const int index) const
returns SbVec2f texture coordinate at index from the texture coordinate pool of the traversal state.
β¨ const SbVec3f & SoCallbackAction::getTextureCoordinate3(const int index) const
returns SbVec3f texture coordinate at index from the texture coordinate pool of the traversal state.
this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. Since: Coin 2.0
β¨ const SbVec4f & SoCallbackAction::getTextureCoordinate4(const int index) const
returns SbVec4f texture coordinate at index from the texture coordinate pool of the traversal state.
β¨ SoTextureCoordinateBinding::Binding SoCallbackAction::getTextureCoordinateBinding(void) const
returns current texture coordinate binding setting.
β¨ const SbColor & SoCallbackAction::getTextureBlendColor(void) const
returns current texture blend color setting.
β¨ const unsigned char * SoCallbackAction::getTextureImage(SbVec2s & size, int & numcomps) const
returns current texture image settings.
β¨ const unsigned char * SoCallbackAction::getTextureImage(SbVec3s & size, int & numcomps) const
returns current 3D texture image settings.
this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. Since: Coin 2.0
Okay bestie, we're in the home stretch β this is where SoCallbackAction hands you back all the state it's been hoarding while it walked the scene graph. Getters, getters, and more getters. π
const SbMatrix & SoCallbackAction::getTextureMatrix (void ) constβ gives you the current texture transformation matrix setting. That 4Γ4 matrix? Yours. πSoTexture2::Model SoCallbackAction::getTextureModel (void ) constβ returns the current texture mapping model setting. Model behavior, not runway model, but honestly both slay. β¨SoTexture2::Wrap SoCallbackAction::getTextureWrapS (void ) constβ returns the current texture wrapping setting for the S coordinate. Wrap it up, bestie. πSoTexture2::Wrap SoCallbackAction::getTextureWrapT (void ) constβ same vibe, but for the T coordinate. π¦SoTexture2::Wrap SoCallbackAction::getTextureWrapR (void ) constβ and now the R coordinate, which is lowkey the special one:
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
Since: Coin 2.0 πΈ
Okay so now we're moving into the matrix-and-camera zone, and it's giving very "look at me, I know where everything is in 3D space." π
const SbMatrix & SoCallbackAction::getModelMatrix (void ) constβ returns the current model matrix. Yes queen, tell us where the geometry actually is. πSoUnits::Units SoCallbackAction::getUnits (void ) constβ returns the current units setting. Inches? Meters? Mystery units? It'll tell you. βfloat SoCallbackAction::getFocalDistance (void ) constβ returns the current camera focal distance setting, as afloat. Camera got focus, fr fr. π₯const SbMatrix & SoCallbackAction::getProjectionMatrix (void ) constβ returns the current projection matrix. Flat 3D β flat 2D, the classic glow-down. πconst SbMatrix & SoCallbackAction::getViewingMatrix (void ) constβ returns the current viewing matrix. Where you're standing when you look at all this. πconst SbViewVolume & SoCallbackAction::getViewVolume (void ) constβ returns the current view volume setting. The lil frustum of it all. π«Άconst SbViewportRegion & SoCallbackAction::getViewportRegion (void ) constβ returns the current viewport region setting.
This method is an extension versus the Open Inventor API.
SoPickStyle::Style SoCallbackAction::getPickStyle (void ) constβ returns the current pick style setting. Pick me, choose me, love me β but in enum form. πint32_t SoCallbackAction::getSwitch (void ) constβ returns the lastSoSwitch::whichChildsetting that happened during the traversal. Which child? The last one, bestie, keep up. β¨SoCallbackAction::Response SoCallbackAction::getCurrentResponse (void ) constβ so this one is internal:
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
And now for the internal machinery, aka the backstage crew that makes the whole traversal work. Not your business, but iconic of them to be documented anyway. π
void SoCallbackAction::invokePreCallbacks (const SoNode *const node)β internal, not likely to interest the app programmer. Its whole job: Invoke all "pre traversal" callbacks. πΈvoid SoCallbackAction::invokePostCallbacks (const SoNode *const node)β also internal. Invoke all "post traversal" callbacks. Symmetry, we love to see it. π¦void SoCallbackAction::invokeTriangleCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3)β internal. Invoke all "triangle generation" callbacks. Three vertices walk into a callbackβ¦ πvoid SoCallbackAction::invokeLineSegmentCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)β internal. Invoke all "line segment generation" callbacks. Two points, one line, endless drama. βvoid SoCallbackAction::invokePointCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v)β internal. Invoke all "point" callbacks. Just the one vertex. Minimalist queen. πSbBool SoCallbackAction::shouldGeneratePrimitives (const SoShape * shape) constβ internal, but the reasoning is so real:
Check from the shape nodes whether or not to generate primitives from the complex shapes. If there are no callbacks attached to the node types, making the primitives would only be a waste of CPU.
Efficiency check passed, periodt. π
SoNode * SoCallbackAction::getCurPathTail (void ) [virtual]β returns the current tail of the traversal path for the callback action.
Reimplemented from SoAction. π
void SoCallbackAction::setCurrentNode (SoNode *const node)β used from nodes during traversal to keep a current node pointer in the action. Somebody has to hold onto the current node, and it's this function. π«Άvoid SoCallbackAction::beginTraversal (SoNode * node) [protected], [virtual]β the big one. This virtual method gets called fromSoAction::apply(), and it's the actual entry point for the scene graph traversal.
It can be overridden to initialize the action at traversal start, for specific initializations in the action subclasses that inherit SoAction.
The default method just calls traverse(), and any overridden implementation of this method must do that too β or call SoAction::beginTraversal() β to actually trigger the scene graph traversal. Don't skip it, bestie, nothing happens without it. π
Reimplemented from SoAction.
π Author π
Generated automatically by Doxygen for Coin from the source code. (The robots did this one, and honestly? They ate. π€β¨)
And that's the whole page, bestie β SoCallbackAction(3), version 4.0.10, dated Thu Jun 25 2026 00:00:00. Go forth and traverse your scene graph with main character energy. π¦π
πΈ
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms