SoCallbackAction(3)
π¦ 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 problemsSoCallbackAction (const SbViewportRegion &vp)β constructor that wants a viewport regionvirtual ~SoCallbackAction (void)β destructor, say bye πvoid setViewportRegion (const SbViewportRegion &vp)β sets the viewport regionvoid addPreCallback (const SoType type, SoCallbackActionCB *cb, void *userdata)β adds a pre callbackvoid addPostCallback (const SoType type, SoCallbackActionCB *cb, void *userdata)β adds a post callbackvoid addPreTailCallback (SoCallbackActionCB *cb, void *userdata)β pre tail callback, the tail is the moment πvoid addPostTailCallback (SoCallbackActionCB *cb, void *userdata)β post tail callbackvoid 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 typefloat getDecimationPercentage (void) constβ gets the decimation percentagefloat getComplexity (void) constβ gets the complexitySoComplexity::Type getComplexityType (void) constβ gets the complexity typeint32_t getNumCoordinates (void) constβ how many coordinates we gotconst SbVec3f & getCoordinate3 (const int index) constβ coordinate, 3 floats, at indexconst SbVec4f & getCoordinate4 (const int index) constβ coordinate, 4 floats, at indexSoDrawStyle::Style getDrawStyle (void) constβ gets the draw styleunsigned short getLinePattern (void) constβ gets the line patternfloat getLineWidth (void) constβ gets the line widthfloat getPointSize (void) constβ gets the point sizeconst SbName & getFontName (void) constβ gets the font namefloat getFontSize (void) constβ gets the font sizeSoLightModel::Model getLightModel (void) constβ gets the light modelconst SbVec3f & getLightAttenuation (void) constβ gets the light attenuationvoid 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 yesindex=0is the default π¨SoMaterialBinding::Binding getMaterialBinding (void) constβ gets the material bindinguint32_t getNumNormals (void) constβ how many normalsconst SbVec3f & getNormal (const int index) constβ the normal at indexSoNormalBinding::Binding getNormalBinding (void) constβ gets the normal bindingint32_t getNumProfileCoordinates (void) constβ how many profile coordinatesconst SbVec2f & getProfileCoordinate2 (const int index) constβ profile coordinate, 2 floatsconst SbVec3f & getProfileCoordinate3 (const int index) constβ profile coordinate, 3 floatsconst SoNodeList & getProfile (void) constβ gets the profileSoShapeHints::VertexOrdering getVertexOrdering (void) constβ gets the vertex orderingSoShapeHints::ShapeType getShapeType (void) constβ gets the shape typeSoShapeHints::FaceType getFaceType (void) constβ gets the face typefloat getCreaseAngle (void) constβ gets the crease angleint32_t getNumTextureCoordinates (void) constβ how many texture coordinatesconst SbVec2f & getTextureCoordinate2 (const int index) constβ texture coordinate, 2 floatsconst SbVec3f & getTextureCoordinate3 (const int index) constβ texture coordinate, 3 floatsconst SbVec4f & getTextureCoordinate4 (const int index) constβ texture coordinate, 4 floatsSoTextureCoordinateBinding::Binding getTextureCoordinateBinding (void) constβ gets the texture coordinate bindingconst SbColor & getTextureBlendColor (void) constβ gets the texture blend colorconst unsigned char * getTextureImage (SbVec2s &size, int &numcomps) constβ texture image pointer, 2D size flavour, plus numcompsconst unsigned char * getTextureImage (SbVec3s &size, int &numcomps) constβ texture image pointer, 3D size flavour, plus numcompsconst SbMatrix & getTextureMatrix (void) constβ gets the texture matrixSoTexture2::Model getTextureModel (void) constβ gets the texture modelSoTexture2::Wrap getTextureWrapS (void) constβ wrap S π§£SoTexture2::Wrap getTextureWrapT (void) constβ wrap TSoTexture2::Wrap getTextureWrapR (void) constβ wrap Rconst SbMatrix & getModelMatrix (void) constβ gets the model matrixSoUnits::Units getUnits (void) constβ gets the unitsfloat getFocalDistance (void) constβ gets the focal distanceconst SbMatrix & getProjectionMatrix (void) constβ gets the projection matrixconst SbMatrix & getViewingMatrix (void) constβ gets the viewing matrixconst SbViewVolume & getViewVolume (void) constβ gets the view volumeconst SbViewportRegion & getViewportRegion (void) constβ gets the viewport regionSoPickStyle::Style getPickStyle (void) constβ gets the pick styleint32_t getSwitch (void) constβ gets the switchResponse getCurrentResponse (void) constβ gets the current responsevoid invokePreCallbacks (const SoNode *const node)β fires off the pre callbacksvoid invokePostCallbacks (const SoNode *const node)β fires off the post callbacksvoid 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, v3void invokeLineSegmentCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)β fires off the line segment callbacks with v1, v2void invokePointCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v)β fires off the point callbacks with vSbBool shouldGeneratePrimitives (const SoShape *shape) constβ should we generate primitives, yes or novirtual SoNode * getCurPathTail (void)β gets the current path tail πvoid setCurrentNode (SoNode *const node)β sets the current nodevoid setCallbackAll (SbBool callbackall)β sets callback-allSbBool isCallbackAll (void) constβ is it callback-all?
π 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)β the class type idstatic void addMethod (const SoType type, SoActionMethod method)β add a methodstatic void enableElement (const SoType type, const int stackindex)β enable an element at stackindexstatic 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 elementsvirtual 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 elementsstatic 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 * stateSoActionMethodList * 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.nodeis 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 size640x512. 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 inheritingSoAction. 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 functioncbto call before every node oftypeis traversed.cbwill be called withuserdata. pre-game callback, let's go πvoid SoCallbackAction::addPostCallback(const SoType type, SoCallbackActionCB * cb, void * userdata)β Set a functioncbto call after every node oftypehas been traversed.cbwill be called withuserdata. afterparty callback πvoid SoCallbackAction::addPreTailCallback(SoCallbackActionCB * cb, void * userdata)β Set a functioncbto call before the tail of a path is traversed.cbwill be called withuserdata. tail time, but make it pre π¦void SoCallbackAction::addPostTailCallback(SoCallbackActionCB * cb, void * userdata)β Set a functioncbto call after the tail of a path has been traversed.cbwill be called withuserdata. tail time, but make it post πΈvoid SoCallbackAction::addTriangleCallback(const SoType type, SoTriangleCB * cb, void * userdata)β Set a functioncbto call when traversing a node oftypewhich generates triangle primitives for rendering.cbwill be called withuserdata. triangles are literally the main character of 3D πΊvoid SoCallbackAction::addLineSegmentCallback(const SoType type, SoLineSegmentCB * cb, void * userdata)β Set a functioncbto call when traversing a node oftypewhich generates line primitives for rendering.cbwill be called withuserdata. lines, but make it fashion πvoid SoCallbackAction::addPointCallback(const SoType type, SoPointCB * cb, void * userdata)β Set a functioncbto call when traversing a node oftypewhich generates single point primitives for rendering.cbwill be called withuserdata. 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 atindexfrom 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 ofSbVec2fprofile coordinates in the state. 2D profile, cute πconst SbVec3f & SoCallbackAction::getProfileCoordinate3(const int index) constβ Returns current number ofSbVec3fprofile 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 theSoShapeHintsnode. If you want to find the crease angle for VRML nodes you'll need to read this directly from thecreaseAnglefield 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β ReturnsSbVec2ftexture coordinate atindexfrom the texture coordinate pool of the traversal state. 2D texture coordinate, slay β¨const SbVec3f & SoCallbackAction::getTextureCoordinate3(const int index) constβ ReturnsSbVec3ftexture coordinate atindexfrom 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β ReturnsSbVec4ftexture coordinate atindexfrom 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 lastSoSwitch::whichChildsetting 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 fromSoAction::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
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms