SoCallbackAction(3)
πΈ NAME πΈ
okay so SoCallbackAction(3) β from the Library Functions Manual β is literally the class that invokes callbacks at specific nodes. periodt. π
β¨ SYNOPSIS β¨
bestie, here's the include and the inheritance tea:
#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 π
okay so the whole function lineup, no cap:
virtual SoType getTypeId (void) constSoCallbackAction (void)SoCallbackAction (const SbViewportRegion &vp)virtual ~SoCallbackAction ()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)
π Public Member Functions inherited from SoAction π
virtual ~SoAction ()virtual SbBool isOfType (SoType type) constvirtual void apply (SoNode *root)virtual void apply (SoPath *path)virtual void apply (const SoPathList &pathlist, SbBool obeysrules=0)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)
π Friends π
class SoCallbackActionP
π«Ά Additional Inherited Members π«Ά
π₯ Protected Attributes inherited from SoAction π₯
SoState * stateSoActionMethodList * traversalMethods
π Detailed Description π
SoCallbackAction is the class that invokes callbacks at specific nodes. iconic. β¨
This action has mechanisms for tracking traversal position and traversal state. When you combine that with the ability to pass geometry primitives to callback actions set by the user, this does for instance make it rather straightforward to extract the geometry of a scene graph. lowkey genius. π§
You should be able to use this action for most of your "simple" traversal needs, instead of cooking up your own code, as the SoCallbackAction is rather flexible. flexible queen. π
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 β¨
typedef Response SoCallbackAction::SoCallbackActionCB(void *userdata, SoCallbackAction *action, const SoNode *node)
Okay so bestie, if you're writing a callback function, it has to be this type. The node is chillin' 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 your callback function. Choose wisely, queen. π
Enumerator
CONTINUEβ keep on traversing like normal, no drama. β¨ABORTβ abort traversal immediately. No other callbacks are called after this has been returned. It's giving "we're done here". πPRUNEβ don't do traversal of neither the current node (if returning from a pre-traversal callback) nor its children. So like, skip it and its whole squad. π¦
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. Important lore, don't forget. π«Ά
π Constructor & Destructor Documentation π
SoCallbackAction::SoCallbackAction (void )
Default constructor. Will set the viewport to a standard viewport with size 640x512. No cap. Periodt.
Referenced by addMethod(), and SoVectorizeAction::addMethod().
SoCallbackAction::SoCallbackAction (const SbViewportRegion & vp)
Constructor which lets you specify the viewport. You get to pick, main character energy. β¨
This constructor is an extension versus the Open Inventor API.
SoCallbackAction::~SoCallbackAction () [virtual]
Destructor. It's the end, bestie. π
π 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. It's giving type safety, bestie. β¨
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 if you're writing extensions, don't skip this step. π
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.
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. So like, it's not for the girlies who just wanna use the library. π
References SoAction::SoAction(), and SoCallbackAction().
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. Same energy as above. β¨
const SoEnabledElementsList & SoCallbackAction::getEnabledElements (void ) const [protected], [virtual]
Returns a list of the elements used by action instances of this class upon traversal operations. It's the squad of elements. π
Reimplemented from SoAction.
Reimplemented in SoVectorizeAction, and SoVectorizePSAction.
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. Pre-traversal glow-up, no cap. β¨
This method is an extension versus the Open Inventor API.
Referenced by SoVectorizeAction::beginPage(), and SoVectorizeAction::beginViewport().
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 ritual. π
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 vibes. π
Referenced by SoDragger::setCameraInfo().
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 = the end of the path, bestie. π¦
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. Cleanup on aisle path. β¨
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 iconic. β¨
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. Points are lowkey underrated. β¨
SoDecimationTypeElement::Type SoCallbackAction::getDecimationType (void ) const
Returns current decimation type setting.
References SoAction::state.
float SoCallbackAction::getDecimationPercentage (void ) const
Returns current decimation percentage setting.
References SoAction::state.
float SoCallbackAction::getComplexity (void ) const
Returns current complexity setting.
References SoAction::state.
SoComplexity::Type SoCallbackAction::getComplexityType (void ) const
Returns current complexity type setting.
References SoAction::state.
int32_t SoCallbackAction::getNumCoordinates (void ) const
Returns current number of coordinates in the state.
References SoAction::state.
const SbVec3f & SoCallbackAction::getCoordinate3 (const int index) const
Returns a coordinate triplet from the current state pool of coordinates.
References SoAction::state.
const SbVec4f & SoCallbackAction::getCoordinate4 (const int index) const
Returns a coordinate quartuplet from the current state pool of coordinates.
References SoAction::state.
SoDrawStyle::Style SoCallbackAction::getDrawStyle (void ) const
Returns current draw style setting.
References SoAction::state.
unsigned short SoCallbackAction::getLinePattern (void ) const
Returns current line pattern setting.
References SoAction::state.
float SoCallbackAction::getLineWidth (void ) const
Returns current line width setting.
References SoLineWidthElement::get(), and SoAction::state.
float SoCallbackAction::getPointSize (void ) const
Returns current point size setting.
References SoPointSizeElement::get(), and SoAction::state.
const SbName & SoCallbackAction::getFontName (void ) const
Returns current fontname setting.
References SoAction::state.
float SoCallbackAction::getFontSize (void ) const
Returns current fontsize setting.
References SoAction::state.
SoLightModel::Model SoCallbackAction::getLightModel (void ) const
Returns current lightmodel setting.
References SoAction::state.
const SbVec3f & SoCallbackAction::getLightAttenuation (void ) const
Returns current light attenuation setting.
References SoAction::state.
void SoCallbackAction::getMaterial (SbColor & ambient, SbColor & diffuse, SbColor & specular, SbColor & emission, float & shininess, float & transparency, const int index = 0) const
Returns current material settings.
References SoAction::state.
SoMaterialBinding::Binding SoCallbackAction::getMaterialBinding (void ) const
Returns current materialbinding setting.
References SoAction::state.
uint32_t SoCallbackAction::getNumNormals (void ) const
Returns current number of normals in the state.
References SoAction::state.
const SbVec3f & SoCallbackAction::getNormal (const int index) const
Returns the normal vectors at index from the current state.
References SoAction::state.
SoNormalBinding::Binding SoCallbackAction::getNormalBinding (void ) const
Returns current normalbinding setting.
References SoAction::state.
int32_t SoCallbackAction::getNumProfileCoordinates (void ) const
Returns current number of profile coordinates in the state.
References SoAction::state.
const SbVec2f & SoCallbackAction::getProfileCoordinate2 (const int index) const
Returns current number of SbVec2f profile coordinates in the state.
References SoAction::state.
const SbVec3f & SoCallbackAction::getProfileCoordinate3 (const int index) const
Returns current number of SbVec3f profile coordinates in the state.
References SoAction::state.
const SoNodeList & SoCallbackAction::getProfile (void ) const
Returns current list of profile nodes.
References SoAction::state.
SoShapeHints::VertexOrdering SoCallbackAction::getVertexOrdering (void ) const
Returns current vertexordering shapehint setting.
References SoAction::state.
SoShapeHints::ShapeType SoCallbackAction::getShapeType (void ) const
Returns current shapetype hint setting.
References SoAction::state.
SoShapeHints::FaceType SoCallbackAction::getFaceType (void ) const
Returns current facetype hint setting.
References SoAction::state.
float SoCallbackAction::getCreaseAngle (void ) const
Returns current creaseangle setting.
References SoAction::state.
int32_t SoCallbackAction::getNumTextureCoordinates (void ) const
Returns current number of texture coordinates in the traversal state.
References SoAction::state.
const SbVec2f & SoCallbackAction::getTextureCoordinate2 (const int index) const
Returns SbVec2f texture coordinate at index from the texture coordinate pool of the traversal state.
References SoAction::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
References SoAction::state.
const SbVec4f & SoCallbackAction::getTextureCoordinate4 (const int index) const
Returns SbVec4f texture coordinate at index from the texture coordinate pool of the traversal state.
References SoAction::state.
SoTextureCoordinateBinding::Binding SoCallbackAction::getTextureCoordinateBinding (void ) const
Returns current texturecoordinate binding setting.
References SoAction::state.
const SbColor & SoCallbackAction::getTextureBlendColor (void ) const
Returns current texture blend color setting.
References SoAction::state.
const unsigned char * SoCallbackAction::getTextureImage (SbVec2s & size, int & numcomps) const
Returns the current texture image settings, bestie. π
References: SoAction::state.
const unsigned char * SoCallbackAction::getTextureImage (SbVec3s & size, int & numcomps) const
Returns the current 3D texture image settings. β¨
This function is a Coin extension, and it is not available in the original SGI Open Inventor v2.1 API. No cap.
Since Coin 2.0.
References: SoAction::state.
const SbMatrix & SoCallbackAction::getTextureMatrix (void ) const
Returns the current texture transformation matrix setting. π¦
References: SoAction::state.
SoTexture2::Model SoCallbackAction::getTextureModel (void ) const
Returns the current texturemapping model setting. π
References: SoAction::state.
SoTexture2::Wrap SoCallbackAction::getTextureWrapS (void ) const
Returns the current texture wrapping setting for the S coordinate. π
References: SoAction::state.
SoTexture2::Wrap SoCallbackAction::getTextureWrapT (void ) const
Returns the current texture wrapping setting for the T coordinate. πΈ
References: SoAction::state.
SoTexture2::Wrap SoCallbackAction::getTextureWrapR (void ) const
Returns the current texture wrapping setting for the R coordinate. π
This function is a Coin extension, and it is not available in the original SGI Open Inventor v2.1 API. Periodt.
Since Coin 2.0.
References: SoAction::state.
const SbMatrix & SoCallbackAction::getModelMatrix (void ) const
Returns the current model matrix. π
References: SoAction::state.
SoUnits::Units SoCallbackAction::getUnits (void ) const
Returns the current units setting. π
References: SoAction::state.
float SoCallbackAction::getFocalDistance (void ) const
Returns the current camera focal distance setting. π
References: SoAction::state.
const SbMatrix & SoCallbackAction::getProjectionMatrix (void ) const
Returns the current projection matrix. π
References: SoAction::state.
const SbMatrix & SoCallbackAction::getViewingMatrix (void ) const
Returns the current viewing matrix. β
References: SoAction::state.
const SbViewVolume & SoCallbackAction::getViewVolume (void ) const
Returns the current view volume setting. π«
References: SoAction::state.
const SbViewportRegion & SoCallbackAction::getViewportRegion (void ) const
Returns the current viewport region setting. πΌοΈ
This method is an extension versus the Open Inventor API. Iykyk.
References: SoAction::getState().
SoPickStyle::Style SoCallbackAction::getPickStyle (void ) const
Returns the current pickstyle setting. π―
References: SoAction::state.
int32_t SoCallbackAction::getSwitch (void ) const
Returns the last SoSwitch::whichChild setting during the traversal. π
References: SoAction::state.
SoCallbackAction::Response SoCallbackAction::getCurrentResponse (void ) const
Ngl, this API member is internal to the library β it's not likely to be of interest to you as an application programmer. π
Referenced by SoNode::callbackS().
void SoCallbackAction::invokePreCallbacks (const SoNode *const node)
This API member is internal to the library, so it's probably not your vibe as an app dev. π
Invoke all "pre traversal" callbacks.
References: ABORT, CONTINUE, SoType::getData(), SoAction::getPathAppliedTo(), SoBase::getTypeId(), SoAction::getWhatAppliedTo(), PRUNE, and SoAction::setTerminated().
Referenced by SoNode::callbackS().
void SoCallbackAction::invokePostCallbacks (const SoNode *const node)
This API member is internal to the library, so it's not really for the application programmer. π
Invoke all "post traversal" callbacks.
References: ABORT, CONTINUE, SoType::getData(), SoAction::getPathAppliedTo(), SoBase::getTypeId(), SoAction::getWhatAppliedTo(), PRUNE, and SoAction::setTerminated().
Referenced by SoNode::callbackS().
void SoCallbackAction::invokeTriangleCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3)
This API member is internal to the library β not likely to be of interest to the application programmer. π
Invoke all "triangle generation" callbacks.
References: SoType::getData(), and SoShape::getTypeId().
Referenced by SoShape::invokeTriangleCallbacks().
void SoCallbackAction::invokeLineSegmentCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)
This API member is internal to the library, so it's not for the app devs. π
Invoke all "line segment generation" callbacks.
References: SoType::getData(), and SoShape::getTypeId().
Referenced by SoShape::invokeLineSegmentCallbacks().
void SoCallbackAction::invokePointCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v)
This API member is internal to the library, so it's not really your concern as an application programmer. π
Invoke all "point" callbacks.
References: SoType::getData(), and SoShape::getTypeId().
Referenced by SoShape::invokePointCallbacks().
SbBool SoCallbackAction::shouldGeneratePrimitives (const SoShape * shape) const
This API member is internal to the library, so it's not likely to be of interest to you as an app dev. π
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. Fr fr.
References: SoType::getData(), and SoShape::getTypeId().
Referenced by SoShape::callback().
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. π
Referenced by SoNode::callbackS().
void SoCallbackAction::beginTraversal (SoNode * node) [protected], [virtual]
This virtual method is called from SoAction::apply(), and it's 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.
The 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.
References: CONTINUE, SoAction::getState(), and SoAction::traverse().
Author
Generated automatically by Doxygen for Coin from the source code. π€
That's the whole vibe, bestie. This page is from Coin version 2.5.0, and it's SoCallbackAction(3). Stay slay. π
β¨
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.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