SoCallbackAction(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸ¦‹ NAME πŸ¦‹

SoCallbackAction β€” the SoCallbackAction class invokes callbacks at specific nodes. πŸ’–

(also hi yes this is a page from the Library Functions Manual, section 3, so you already know it's giving real C++ API energy ✨)


🌸 SYNOPSIS 🌸

#include <Inventor/actions/SoCallbackAction.h>

okay so first things first, the family tree bestie:

  • 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) const β€” the type id moment πŸ’«
  • SoCallbackAction (void) β€” default constructor, no args no problems
  • SoCallbackAction (const SbViewportRegion &vp) β€” constructor that wants a viewport region
  • virtual ~SoCallbackAction (void) β€” destructor, say bye πŸ‘‹
  • void setViewportRegion (const SbViewportRegion &vp) β€” sets the viewport region
  • void addPreCallback (const SoType type, SoCallbackActionCB *cb, void *userdata) β€” adds a pre callback
  • void addPostCallback (const SoType type, SoCallbackActionCB *cb, void *userdata) β€” adds a post callback
  • void addPreTailCallback (SoCallbackActionCB *cb, void *userdata) β€” pre tail callback, the tail is the moment 🐍
  • void addPostTailCallback (SoCallbackActionCB *cb, void *userdata) β€” post tail callback
  • void addTriangleCallback (const SoType type, SoTriangleCB *cb, void *userdata) β€” triangle callback, the geometry girlies know πŸ”Ί
  • void addLineSegmentCallback (const SoType type, SoLineSegmentCB *cb, void *userdata) β€” line segment callback πŸ“
  • void addPointCallback (const SoType type, SoPointCB *cb, void *userdata) β€” point callback πŸ“
  • SoDecimationTypeElement::Type getDecimationType (void) const β€” gets the decimation type
  • float getDecimationPercentage (void) const β€” gets the decimation percentage
  • float getComplexity (void) const β€” gets the complexity
  • SoComplexity::Type getComplexityType (void) const β€” gets the complexity type
  • int32_t getNumCoordinates (void) const β€” how many coordinates we got
  • const SbVec3f & getCoordinate3 (const int index) const β€” coordinate, 3 floats, at index
  • const SbVec4f & getCoordinate4 (const int index) const β€” coordinate, 4 floats, at index
  • SoDrawStyle::Style getDrawStyle (void) const β€” gets the draw style
  • unsigned short getLinePattern (void) const β€” gets the line pattern
  • float getLineWidth (void) const β€” gets the line width
  • float getPointSize (void) const β€” gets the point size
  • const SbName & getFontName (void) const β€” gets the font name
  • float getFontSize (void) const β€” gets the font size
  • SoLightModel::Model getLightModel (void) const β€” gets the light model
  • const SbVec3f & getLightAttenuation (void) const β€” gets the light attenuation
  • void getMaterial (SbColor &ambient, SbColor &diffuse, SbColor &specular, SbColor &emission, float &shininess, float &transparency, const int index=0) const β€” the whole material haul: ambient, diffuse, specular, emission, shininess, transparency, and yes index=0 is the default 🎨
  • SoMaterialBinding::Binding getMaterialBinding (void) const β€” gets the material binding
  • uint32_t getNumNormals (void) const β€” how many normals
  • const SbVec3f & getNormal (const int index) const β€” the normal at index
  • SoNormalBinding::Binding getNormalBinding (void) const β€” gets the normal binding
  • int32_t getNumProfileCoordinates (void) const β€” how many profile coordinates
  • const SbVec2f & getProfileCoordinate2 (const int index) const β€” profile coordinate, 2 floats
  • const SbVec3f & getProfileCoordinate3 (const int index) const β€” profile coordinate, 3 floats
  • const SoNodeList & getProfile (void) const β€” gets the profile
  • SoShapeHints::VertexOrdering getVertexOrdering (void) const β€” gets the vertex ordering
  • SoShapeHints::ShapeType getShapeType (void) const β€” gets the shape type
  • SoShapeHints::FaceType getFaceType (void) const β€” gets the face type
  • float getCreaseAngle (void) const β€” gets the crease angle
  • int32_t getNumTextureCoordinates (void) const β€” how many texture coordinates
  • const SbVec2f & getTextureCoordinate2 (const int index) const β€” texture coordinate, 2 floats
  • const SbVec3f & getTextureCoordinate3 (const int index) const β€” texture coordinate, 3 floats
  • const SbVec4f & getTextureCoordinate4 (const int index) const β€” texture coordinate, 4 floats
  • SoTextureCoordinateBinding::Binding getTextureCoordinateBinding (void) const β€” gets the texture coordinate binding
  • const SbColor & getTextureBlendColor (void) const β€” gets the texture blend color
  • const unsigned char * getTextureImage (SbVec2s &size, int &numcomps) const β€” texture image pointer, 2D size flavour, plus numcomps
  • const unsigned char * getTextureImage (SbVec3s &size, int &numcomps) const β€” texture image pointer, 3D size flavour, plus numcomps
  • const SbMatrix & getTextureMatrix (void) const β€” gets the texture matrix
  • SoTexture2::Model getTextureModel (void) const β€” gets the texture model
  • SoTexture2::Wrap getTextureWrapS (void) const β€” wrap S 🧣
  • SoTexture2::Wrap getTextureWrapT (void) const β€” wrap T
  • SoTexture2::Wrap getTextureWrapR (void) const β€” wrap R
  • const SbMatrix & getModelMatrix (void) const β€” gets the model matrix
  • SoUnits::Units getUnits (void) const β€” gets the units
  • float getFocalDistance (void) const β€” gets the focal distance
  • const SbMatrix & getProjectionMatrix (void) const β€” gets the projection matrix
  • const SbMatrix & getViewingMatrix (void) const β€” gets the viewing matrix
  • const SbViewVolume & getViewVolume (void) const β€” gets the view volume
  • const SbViewportRegion & getViewportRegion (void) const β€” gets the viewport region
  • SoPickStyle::Style getPickStyle (void) const β€” gets the pick style
  • int32_t getSwitch (void) const β€” gets the switch
  • Response getCurrentResponse (void) const β€” gets the current response
  • void invokePreCallbacks (const SoNode *const node) β€” fires off the pre callbacks
  • void invokePostCallbacks (const SoNode *const node) β€” fires off the post callbacks
  • void invokeTriangleCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3) β€” fires off the triangle callbacks with v1, v2, v3
  • void invokeLineSegmentCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2) β€” fires off the line segment callbacks with v1, v2
  • void invokePointCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v) β€” fires off the point callbacks with v
  • SbBool shouldGeneratePrimitives (const SoShape *shape) const β€” should we generate primitives, yes or no
  • virtual SoNode * getCurPathTail (void) β€” gets the current path tail 🐈
  • void setCurrentNode (SoNode *const node) β€” sets the current node
  • void setCallbackAll (SbBool callbackall) β€” sets callback-all
  • SbBool isCallbackAll (void) const β€” is it callback-all?

πŸ’œ Public Member Functions inherited from SoAction πŸ’œ

  • virtual ~SoAction (void)
  • virtual SbBool isOfType (SoType type) const
  • virtual 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) const
  • SoNode * getNodeAppliedTo (void) const
  • SoPath * getPathAppliedTo (void) const
  • const SoPathList * getPathListAppliedTo (void) const
  • const SoPathList * getOriginalPathListAppliedTo (void) const
  • SbBool isLastPathListAppliedTo (void) const
  • PathCode getPathCode (int &numindices, const int *&indices)
  • void traverse (SoNode *const node)
  • SbBool hasTerminated (void) const
  • const SoPath * getCurPath (void)
  • SoState * getState (void) const
  • PathCode getCurPathCode (void) const
  • void 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) β€” the class type id
  • static void addMethod (const SoType type, SoActionMethod method) β€” add a method
  • static void enableElement (const SoType type, const int stackindex) β€” enable an element at stackindex
  • static void initClass (void) β€” init the class ✨

πŸ’« 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) const β€” gets the enabled elements
  • virtual void beginTraversal (SoNode *node) β€” begins the traversal, go go go 🏁

🌷 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) β€” gets the class enabled elements
  • static SoActionMethodList * getClassActionMethods (void) β€” gets the class action methods

🌈 Static Protected Member Functions inherited from SoAction 🌈

  • static SoEnabledElementsList * getClassEnabledElements (void)
  • static SoActionMethodList * getClassActionMethods (void)

🎁 Additional Inherited Members 🎁

🧸 Protected Attributes inherited from SoAction 🧸

  • SoState * state
  • SoActionMethodList * traversalMethods

🌈 Detailed Description 🌈

okay bestie, gather round, because this one is actually iconic. 🫢

The SoCallbackAction class invokes callbacks at specific nodes. That's the whole premise. Periodt. πŸ’…

This action has mechanisms for tracking traversal position and traversal state. And when you pair that up with the ability to pass geometry primitives to callback actions that you set yourself, it makes stuff like extracting the geometry of a scene graph honestly pretty straightforward. Like, no cap, it's giving "why did I ever hand-roll this". ✨

You should be able to use this action for most of your "simple" traversal needs, instead of cooking up your own code from scratch, because the SoCallbackAction is rather flexible. πŸ‘‘

A common use of this action is to extract geometry of non-primitive shapes as triangles. A full-fledged example that demonstrates this on a scenegraph with two spheres follows: πŸ”ΊπŸ”Ί

#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 scenegraph in a viewer, or written to disk
  // or something]

  return 0;
}

πŸŽ€ Member Typedef Documentation πŸŽ€

okay bestie, first up we got a typedef and it's giving callback energy πŸ’…

  • typedef Response SoCallbackAction::SoCallbackActionCB(void *userdata, SoCallbackAction *action, const SoNode *node) β€” Callback functions need to be of this type. node is at the current traversal point in the scene graph.

🌈 Member Enumeration Documentation 🌈

enum SoCallbackAction::Response β€” Response values for callback function.

✨ Enumerator ✨

  • CONTINUE β€” Continue traversal as usual. no drama, just vibes πŸ¦‹
  • ABORT β€” Abort traversal immediately. No other callbacks are called after this has been returned. it's a full stop, periodt πŸ’€
  • PRUNE β€” Don't do traversal of neither the current node (if returning from a pre-traversal callback) nor its children. like, we're skipping this whole branch, okay? 🌸

If returned from a pre-callback, the post-callbacks will still be called. If returned from a post-callback, the behaviour will be the same as for returning CONTINUE. so basically post-callbacks are unbothered either way πŸ™ˆ


πŸ’… Constructor & Destructor Documentation πŸ’…

  • SoCallbackAction::SoCallbackAction(void) β€” Default constructor. Will set the viewport to a standard viewport with size 640x512. iconic default tbh ✨
  • SoCallbackAction::SoCallbackAction(const SbViewportRegion & vp) β€” Constructor which lets you specify the viewport. This constructor is an extension versus the Open Inventor API. 🫢
  • SoCallbackAction::~SoCallbackAction(void) [virtual] β€” Destructor. bye bestie, thanks for the memories πŸŽ€

🌸 Member Function Documentation 🌸

  • SoType SoCallbackAction::getTypeId(void) const [virtual] β€” Returns the type identification of an action derived from a class inheriting SoAction. This is used for run-time type checking and "downward" casting. the way that this is literally the vibe check for your action type πŸ‘‘

Usage example:

void bar(SoAction * action)
{
  if (action->getTypeId() == SoGLRenderAction::getClassTypeId()) {
    // safe downward cast, know the type
    SoGLRenderAction * glrender = (SoGLRenderAction *)action;
  }
  return; // ignore if not renderaction
}

For application programmers wanting to extend the library with new actions: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through Inventor/nodes/SoSubAction.h: SO_ACTION_SOURCE, SO_ACTION_INIT_CLASS and SO_ACTION_CONSTRUCTOR. so many macros, so little time πŸ¦‹

For more information on writing Coin extensions, see the SoAction class documentation.

Returns the actual type id of an object derived from a class inheriting SoAction. Needs to be overridden in all subclasses.

Implements SoAction.

Reimplemented in SoVectorizeAction, and SoVectorizePSAction. slay inheritance chain 🌈

  • 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. iykyk, it's giving internal business πŸ™ˆ
  • 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. again, not for the girlies in userland πŸ’…
  • const SoEnabledElementsList & SoCallbackAction::getEnabledElements(void) const [protected], [virtual] β€” Returns a list of the elements used by action instances of this class upon traversal operations.

Reimplemented from SoAction.

Reimplemented in SoVectorizeAction, and SoVectorizePSAction. the whole family is here πŸ‘‘

  • 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. fancy extra credit ✨

  • 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 callback, let's go 🏁
  • 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. afterparty callback πŸŽ‰
  • 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. tail time, but make it pre πŸ¦‹
  • 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. tail time, but make it post 🌸
  • 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. triangles are literally the main character of 3D πŸ”Ί
  • 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. lines, but make it fashion πŸ“
  • 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. just a lil point, no biggie ⭐
  • SoDecimationTypeElement::Type SoCallbackAction::getDecimationType(void) const β€” Returns current decimation type setting. decimation? more like decim-ate πŸ’…
  • float SoCallbackAction::getDecimationPercentage(void) const β€” Returns current decimation percentage setting. percentage check, bestie πŸ“Š
  • float SoCallbackAction::getComplexity(void) const β€” Returns current complexity setting. it's giving complicated πŸŒ€
  • SoComplexity::Type SoCallbackAction::getComplexityType(void) const β€” Returns current complexity type setting. what kind of complexity, exactly? πŸ€”
  • int32_t SoCallbackAction::getNumCoordinates(void) const β€” Returns current number of coordinates in the state. count 'em πŸ”’
  • const SbVec3f & SoCallbackAction::getCoordinate3(const int index) const β€” Returns a coordinate triplet from the current state pool of coordinates. triplet = three numbers, no cap 3️⃣
  • const SbVec4f & SoCallbackAction::getCoordinate4(const int index) const β€” Returns a coordinate quartuplet from the current state pool of coordinates. quartuplet is a word and I'm obsessed 4️⃣
  • SoDrawStyle::Style SoCallbackAction::getDrawStyle(void) const β€” Returns current draw style setting. draw style, periodt 🎨
  • unsigned short SoCallbackAction::getLinePattern(void) const β€” Returns current line pattern setting. dashed? dotted? iconic either way ✨
  • float SoCallbackAction::getLineWidth(void) const β€” Returns current line width setting. thicc lines only πŸ“
  • float SoCallbackAction::getPointSize(void) const β€” Returns current point size setting. big point energy πŸ”΅
  • const SbName & SoCallbackAction::getFontName(void) const β€” Returns current fontname setting. what's the font, bestie? πŸ”€
  • float SoCallbackAction::getFontSize(void) const β€” Returns current fontsize setting. font size matters, fr fr πŸ” 
  • SoLightModel::Model SoCallbackAction::getLightModel(void) const β€” Returns current lightmodel setting. lighting model, serving looks πŸ’‘
  • const SbVec3f & SoCallbackAction::getLightAttenuation(void) const β€” Returns current light attenuation setting. attenuation = fade, and it's giving mood lighting 🌟
  • void SoCallbackAction::getMaterial(SbColor & ambient, SbColor & diffuse, SbColor & specular, SbColor & emission, float & shininess, float & transparency, const int index = 0) const β€” Returns current material settings. material girl, material world πŸ’Ž
  • SoMaterialBinding::Binding SoCallbackAction::getMaterialBinding(void) const β€” Returns current materialbinding setting. how is the material bound? the tea πŸ«–
  • uint32_t SoCallbackAction::getNumNormals(void) const β€” Returns current number of normals in the state. normals, but they're not basic πŸ“
  • const SbVec3f & SoCallbackAction::getNormal(const int index) const β€” Returns the normal vectors at index from the current state. normal vector at your service ➑️
  • SoNormalBinding::Binding SoCallbackAction::getNormalBinding(void) const β€” Returns current normalbinding setting. binding but make it normal πŸ”—
  • int32_t SoCallbackAction::getNumProfileCoordinates(void) const β€” Returns current number of profile coordinates in the state. profile coords, very demure πŸ“‹
  • const SbVec2f & SoCallbackAction::getProfileCoordinate2(const int index) const β€” Returns current number of SbVec2f profile coordinates in the state. 2D profile, cute πŸŽ€
  • const SbVec3f & SoCallbackAction::getProfileCoordinate3(const int index) const β€” Returns current number of SbVec3f profile coordinates in the state. 3D profile, even cuter πŸ¦‹
  • const SoNodeList & SoCallbackAction::getProfile(void) const β€” Returns current list of profile nodes. the whole profile list, bestie πŸ“
  • SoShapeHints::VertexOrdering SoCallbackAction::getVertexOrdering(void) const β€” Returns current vertexordering shapehint setting.

Please note that this is the vertex ordering set by the SoShapeHints node. If you want to find the vertex ordering for VRML nodes you'll need to read this directly from the ccw field in those nodes. important caveat, don't @ me ⚠️

  • SoShapeHints::ShapeType SoCallbackAction::getShapeType(void) const β€” Returns current shapetype hint setting.

Please note that this is the shape type set by the SoShapeHints node. If you want to find the shape type for VRML nodes you'll need to read this directly from the solid field in those nodes. read the field, bestie, don't guess πŸ›‘

  • SoShapeHints::FaceType SoCallbackAction::getFaceType(void) const β€” Returns current facetype hint setting.

Please note that this is the face type set by the SoShapeHints node. If you want to find the face type for VRML nodes you'll need to read this directly from the convex field in those nodes. convex field, noted πŸ“Œ

  • float SoCallbackAction::getCreaseAngle(void) const β€” Returns current creaseangle 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. creaseAngle field, got it πŸ“
  • int32_t SoCallbackAction::getNumTextureCoordinates(void) const β€” Returns current number of texture coordinates in the traversal state. texture coords count 🧡
  • const SbVec2f & SoCallbackAction::getTextureCoordinate2(const int index) const β€” Returns SbVec2f texture coordinate at index from the texture coordinate pool of the traversal state. 2D texture coordinate, slay ✨
  • 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 Coin 2.0 era, we love to see it 🫢

  • const SbVec4f & SoCallbackAction::getTextureCoordinate4(const int index) const β€” Returns SbVec4f texture coordinate at index from the texture coordinate pool of the traversal state. 4D texture coordinate, extra dimensional πŸŒ€
  • SoTextureCoordinateBinding::Binding SoCallbackAction::getTextureCoordinateBinding(void) const β€” Returns current texturecoordinate binding setting. binding but for texture coords πŸ”—
  • const SbColor & SoCallbackAction::getTextureBlendColor(void) const β€” Returns current texture blend color setting. blend color, the vibe 🎨
  • const unsigned char * SoCallbackAction::getTextureImage(SbVec2s & size, int & numcomps) const β€” Returns current texture image settings. 2D texture image, got the pixels πŸ–ΌοΈ
  • 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 3D texture, Coin 2.0 exclusive πŸ’Ž

  • const SbMatrix & SoCallbackAction::getTextureMatrix(void) const β€” Returns current texture transformation matrix setting. matrix moment πŸ”’
  • SoTexture2::Model SoCallbackAction::getTextureModel(void) const β€” Returns current texturemapping model setting. texture model, serving looks πŸ‘‘
  • SoTexture2::Wrap SoCallbackAction::getTextureWrapS (void ) const β€” hands you the texture wrapping setting the action is currently rocking for the S coordinate πŸŽ€
  • SoTexture2::Wrap SoCallbackAction::getTextureWrapT (void ) const β€” same vibe, but for the T coordinate ✨
  • SoTexture2::Wrap SoCallbackAction::getTextureWrapR (void ) const β€” and here's the R coordinate 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

  • const SbMatrix & SoCallbackAction::getModelMatrix (void ) const β€” returns the current model matrix, no cap πŸ“
  • SoUnits::Units SoCallbackAction::getUnits (void ) const β€” returns the current units setting πŸ’œ
  • float SoCallbackAction::getFocalDistance (void ) const β€” returns the current camera focal distance setting πŸ”₯
  • const SbMatrix & SoCallbackAction::getProjectionMatrix (void ) const β€” returns the current projection matrix 🌸
  • const SbMatrix & SoCallbackAction::getViewingMatrix (void ) const β€” returns the current viewing matrix 🌈
  • const SbViewVolume & SoCallbackAction::getViewVolume (void ) const β€” returns the current view volume setting ⭐
  • 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 pickstyle setting πŸ’…
  • int32_t SoCallbackAction::getSwitch (void ) const β€” returns the last SoSwitch::whichChild setting from during the traversal πŸ‘‘
  • SoCallbackAction::Response SoCallbackAction::getCurrentResponse (void ) const β€” this API member is considered internal to the library, as it is not likely to be of interest to the application programmer πŸ™ˆ
  • void SoCallbackAction::invokePreCallbacks (const SoNode *const node) β€” internal library business, not really for the app programmer's eyes.

Invoke all "pre traversal" callbacks ✨

  • void SoCallbackAction::invokePostCallbacks (const SoNode *const node) β€” same internal energy.

Invoke all "post traversal" callbacks ✨

  • void SoCallbackAction::invokeTriangleCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3) β€” internal library member, not likely to be of interest to the application programmer.

Invoke all "triangle generation" callbacks πŸ”Ί

  • void SoCallbackAction::invokeLineSegmentCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2) β€” internal library member, not likely to be of interest to the application programmer.

Invoke all "line segment generation" callbacks πŸ“

  • void SoCallbackAction::invokePointCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v) β€” internal library member, not likely to be of interest to the application programmer.

Invoke all "point" callbacks πŸ“

  • SbBool SoCallbackAction::shouldGeneratePrimitives (const SoShape * shape) const β€” internal library member, not likely to be of interest to the application programmer.

Checks with 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 πŸ’€

  • 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 πŸŽ€
  • void SoCallbackAction::beginTraversal (SoNode * node) [protected], [virtual] β€” this virtual method is called from SoAction::apply(), and is the entry point for the actual scenegraph traversal πŸšͺ✨

It can be overridden to initialize the action at traversal start, for specific initializations in the action subclasses inheriting SoAction.

Default method just calls traverse(), which any overridden implementation of the method must do too (or call SoAction::beginTraversal()) to trigger the scenegraph traversal πŸ‘‘

Reimplemented from SoAction.


πŸ’– Author πŸ’–

Generated automatically by Doxygen for Coin from the source code πŸ€–βœ¨


and that's a wrap bestie!! this whole page is Coin Version 3.1.3 tea, dated SoCallbackAction(3) β€” go forth and traverse, you absolute icon πŸ’…πŸ‘‘πŸ’–

πŸ“¦ where this page comes from