Coin  4.0.3
Coin3D core library
Loading...
Searching...
No Matches
SoCallbackAction Class Reference

The SoCallbackAction class invokes callbacks at specific nodes. More...

#include <Inventor/actions/SoCallbackAction.h>

Inheritance diagram for SoCallbackAction:
SoAction SoVectorizeAction SoVectorizePSAction

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

 SoCallbackAction (const SbViewportRegion &vp)
 
 SoCallbackAction (void)
 
virtual ~SoCallbackAction (void)
 
void addLineSegmentCallback (const SoType type, SoLineSegmentCB *cb, void *userdata)
 
void addPointCallback (const SoType type, SoPointCB *cb, void *userdata)
 
void addPostCallback (const SoType type, SoCallbackActionCB *cb, void *userdata)
 
void addPostTailCallback (SoCallbackActionCB *cb, void *userdata)
 
void addPreCallback (const SoType type, SoCallbackActionCB *cb, void *userdata)
 
void addPreTailCallback (SoCallbackActionCB *cb, void *userdata)
 
void addTriangleCallback (const SoType type, SoTriangleCB *cb, void *userdata)
 
float getComplexity (void) const
 
SoComplexity::Type getComplexityType (void) const
 
const SbVec3fgetCoordinate3 (const int index) const
 
const SbVec4fgetCoordinate4 (const int index) const
 
float getCreaseAngle (void) const
 
virtual SoNodegetCurPathTail (void)
 
Response getCurrentResponse (void) const
 
float getDecimationPercentage (void) const
 
SoDecimationTypeElement::Type getDecimationType (void) const
 
SoDrawStyle::Style getDrawStyle (void) const
 
SoShapeHints::FaceType getFaceType (void) const
 
float getFocalDistance (void) const
 
const SbNamegetFontName (void) const
 
float getFontSize (void) const
 
const SbVec3fgetLightAttenuation (void) const
 
SoLightModel::Model getLightModel (void) const
 
unsigned short getLinePattern (void) const
 
float getLineWidth (void) const
 
void getMaterial (SbColor &ambient, SbColor &diffuse, SbColor &specular, SbColor &emission, float &shininess, float &transparency, const int index=0) const
 
SoMaterialBinding::Binding getMaterialBinding (void) const
 
const SbMatrixgetModelMatrix (void) const
 
const SbVec3fgetNormal (const int index) const
 
SoNormalBinding::Binding getNormalBinding (void) const
 
int32_t getNumCoordinates (void) const
 
uint32_t getNumNormals (void) const
 
int32_t getNumProfileCoordinates (void) const
 
int32_t getNumTextureCoordinates (void) const
 
SoPickStyle::Style getPickStyle (void) const
 
float getPointSize (void) const
 
const SoNodeListgetProfile (void) const
 
const SbVec2fgetProfileCoordinate2 (const int index) const
 
const SbVec3fgetProfileCoordinate3 (const int index) const
 
const SbMatrixgetProjectionMatrix (void) const
 
SoShapeHints::ShapeType getShapeType (void) const
 
int32_t getSwitch (void) const
 
const SbColorgetTextureBlendColor (void) const
 
const SbVec2fgetTextureCoordinate2 (const int index) const
 
const SbVec3fgetTextureCoordinate3 (const int index) const
 
const SbVec4fgetTextureCoordinate4 (const int index) const
 
SoTextureCoordinateBinding::Binding getTextureCoordinateBinding (void) const
 
const unsigned char * getTextureImage (SbVec2s &size, int &numcomps) const
 
const unsigned char * getTextureImage (SbVec3s &size, int &numcomps) const
 
const SbMatrixgetTextureMatrix (void) const
 
SoTexture2::Model getTextureModel (void) const
 
SoTexture2::Wrap getTextureWrapR (void) const
 
SoTexture2::Wrap getTextureWrapS (void) const
 
SoTexture2::Wrap getTextureWrapT (void) const
 
virtual SoType getTypeId (void) const
 
SoUnits::Units getUnits (void) const
 
SoShapeHints::VertexOrdering getVertexOrdering (void) const
 
const SbMatrixgetViewingMatrix (void) const
 
const SbViewportRegiongetViewportRegion (void) const
 
const SbViewVolumegetViewVolume (void) const
 
void invokeLineSegmentCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)
 
void invokePointCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v)
 
void invokePostCallbacks (const SoNode *const node)
 
void invokePreCallbacks (const SoNode *const node)
 
void invokeTriangleCallbacks (const SoShape *const shape, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3)
 
SbBool isCallbackAll (void) const
 
void setCallbackAll (SbBool callbackall)
 
void setCurrentNode (SoNode *const node)
 
void setViewportRegion (const SbViewportRegion &vp)
 
SbBool shouldGeneratePrimitives (const SoShape *shape) const
 
- Public Member Functions inherited from SoAction
virtual ~SoAction (void)
 
virtual void apply (const SoPathList &pathlist, SbBool obeysrules=FALSE)
 
void apply (SoAction *beingApplied)
 
virtual void apply (SoNode *root)
 
virtual void apply (SoPath *path)
 
const SoPathgetCurPath (void)
 
PathCode getCurPathCode (void) const
 
SoNodegetNodeAppliedTo (void) const
 
const SoPathListgetOriginalPathListAppliedTo (void) const
 
SoPathgetPathAppliedTo (void) const
 
PathCode getPathCode (int &numindices, const int *&indices)
 
const SoPathListgetPathListAppliedTo (void) const
 
SoStategetState (void) const
 
AppliedCode getWhatAppliedTo (void) const
 
SbBool hasTerminated (void) const
 
virtual void invalidateState (void)
 
SbBool isLastPathListAppliedTo (void) const
 
virtual SbBool isOfType (SoType type) const
 
void popCurPath (const PathCode prevpathcode)
 
void popCurPath (void)
 
void popPushCurPath (const int childindex, SoNode *node=NULL)
 
void pushCurPath (const int childindex, SoNode *node=NULL)
 
void pushCurPath (void)
 
void switchToNodeTraversal (SoNode *node)
 
void switchToPathTraversal (SoPath *path)
 
void traverse (SoNode *const node)
 
void usePathCode (int &numindices, const int *&indices)
 

Static Public Member Functions

static void addMethod (const SoType type, SoActionMethod method)
 
static void enableElement (const SoType type, const int stackindex)
 
static SoType getClassTypeId (void)
 
static void initClass (void)
 
- Static Public Member Functions inherited from SoAction
static SoType getClassTypeId (void)
 
static void initClass (void)
 
static void initClasses (void)
 
static void nullAction (SoAction *action, SoNode *node)
 

Protected Member Functions

virtual void beginTraversal (SoNode *node)
 
virtual const SoEnabledElementsListgetEnabledElements (void) const
 
- 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 SoActionMethodListgetClassActionMethods (void)
 
static SoEnabledElementsListgetClassEnabledElements (void)
 
- Static Protected Member Functions inherited from SoAction
static SoActionMethodListgetClassActionMethods (void)
 
static SoEnabledElementsListgetClassEnabledElements (void)
 

Additional Inherited Members

- Protected Attributes inherited from SoAction
SoStatestate
 
SoActionMethodListtraversalMethods
 

Detailed Description

The SoCallbackAction class invokes callbacks at specific nodes.

This action has mechanisms for tracking traversal position and traversal state. In combination 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.

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.

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 scene graph 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 int coord3idx = 0;
static void
triangle_cb(void * userdata, SoCallbackAction * action,
{
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)
{
SoSeparator * root = new SoSeparator;
root->addChild(new SoSphere);
trans->translation.setValue(10, 0, 0);
root->addChild(trans);
SoSphere * ss = new SoSphere;
ss->radius = 3;
root->addChild(ss);
root->ref();
coord3->point.setNum(0);
ifs->coordIndex.setNum(0);
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;
}
The SbList class is a template container class for lists.
Definition SbList.h:70
The SbMatrix class is a 4x4 dimensional representation of a matrix.
Definition SbMatrix.h:47
The SbVec3f class is a 3 dimensional vector with floating point coordinates.
Definition SbVec3f.h:51
void unref(void) const
Definition SoBase.cpp:530
void ref(void) const
Definition SoBase.cpp:478
The SoCallbackAction class invokes callbacks at specific nodes.
Definition SoCallbackAction.h:80
const SbMatrix & getModelMatrix(void) const
Definition SoCallbackAction.cpp:1032
The SoCoordinate3 class is a node for providing coordinates to shape nodes.
Definition SoCoordinate3.h:41
static void init(void)
Definition SoDB.cpp:200
virtual void addChild(SoNode *node)
Definition SoGroup.cpp:453
The SoIndexedFaceSet class is used to handle generic indexed facesets.
Definition SoIndexedFaceSet.h:45
The SoPrimitiveVertex class represents a single vertex of a generated primitive.
Definition SoPrimitiveVertex.h:43
The SoSeparator class is a state-preserving group node.
Definition SoSeparator.h:44
static SoType getClassTypeId(void)
Definition SoShape.cpp:343
The SoSphere class is for rendering sphere shapes.
Definition SoSphere.h:40
The SoTranslation class is a node type for specifying geometry translations.
Definition SoTranslation.h:40

Member Typedef Documentation

◆ SoCallbackActionCB

Response SoCallbackAction::SoCallbackActionCB

Callback functions need to be of this type. node is at the current traversal point in the scene graph.

Member Enumeration Documentation

◆ Response

Response values for callback function.

Enumerator
CONTINUE 

Continue traversal as usual.

ABORT 

Abort traversal immediately. No other callbacks are called after this has been returned.

PRUNE 

Don't do traversal of neither the current node (if returning from a pre-traversal callback) nor its children.

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.

Constructor & Destructor Documentation

◆ SoCallbackAction() [1/2]

SoCallbackAction::SoCallbackAction ( void )

Default constructor. Will set the viewport to a standard viewport with size 640x512.

◆ SoCallbackAction() [2/2]

SoCallbackAction::SoCallbackAction ( const SbViewportRegion & vp)

Constructor which lets you specify the viewport.

This constructor is an extension versus the Open Inventor API.

◆ ~SoCallbackAction()

SoCallbackAction::~SoCallbackAction ( void )
virtual

Destructor.

Member Function Documentation

◆ addLineSegmentCallback()

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.

◆ addMethod()

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.

◆ addPointCallback()

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.

◆ addPostCallback()

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.

◆ addPostTailCallback()

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.

◆ addPreCallback()

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.

◆ addPreTailCallback()

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.

◆ addTriangleCallback()

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.

◆ beginTraversal()

void SoCallbackAction::beginTraversal ( SoNode * node)
protectedvirtual

This virtual method is called from SoAction::apply(), and is the entry point for the actual scene graph 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 scene graph traversal.

Reimplemented from SoAction.

◆ enableElement()

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.

◆ getClassActionMethods()

SoActionMethodList * SoCallbackAction::getClassActionMethods ( void )
staticprotected

Returns list of action methods for this class. 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.

◆ getClassEnabledElements()

SoEnabledElementsList * SoCallbackAction::getClassEnabledElements ( void )
staticprotected

Returns list of enabled elements for this class. 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.

◆ getClassTypeId()

SoType SoCallbackAction::getClassTypeId ( void )
static

This static method returns the SoType object associated with objects of this class.

◆ getComplexity()

float SoCallbackAction::getComplexity ( void ) const

Returns current complexity setting.

◆ getComplexityType()

SoComplexity::Type SoCallbackAction::getComplexityType ( void ) const

Returns current complexity type setting.

◆ getCoordinate3()

const SbVec3f & SoCallbackAction::getCoordinate3 ( const int index) const

Returns a coordinate triplet from the current state pool of coordinates.

◆ getCoordinate4()

const SbVec4f & SoCallbackAction::getCoordinate4 ( const int index) const

Returns a coordinate quadruplet from the current state pool of coordinates.

◆ getCreaseAngle()

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.

◆ getCurPathTail()

SoNode * SoCallbackAction::getCurPathTail ( void )
virtual

Returns the current tail of the traversal path for the callback action.

Reimplemented from SoAction.

◆ getCurrentResponse()

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.

◆ getDecimationPercentage()

float SoCallbackAction::getDecimationPercentage ( void ) const

Returns current decimation percentage setting.

◆ getDecimationType()

SoDecimationTypeElement::Type SoCallbackAction::getDecimationType ( void ) const

Returns current decimation type setting.

◆ getDrawStyle()

SoDrawStyle::Style SoCallbackAction::getDrawStyle ( void ) const

Returns current draw style setting.

◆ getEnabledElements()

const SoEnabledElementsList & SoCallbackAction::getEnabledElements ( void ) const
protectedvirtual

Returns list of enabled elements.

Reimplemented from SoAction.

Reimplemented in SoVectorizeAction, and SoVectorizePSAction.

◆ getFaceType()

SoShapeHints::FaceType SoCallbackAction::getFaceType ( void ) const

Returns current face type 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.

◆ getFocalDistance()

float SoCallbackAction::getFocalDistance ( void ) const

Returns current camera focal distance setting.

◆ getFontName()

const SbName & SoCallbackAction::getFontName ( void ) const

Returns current font name setting.

◆ getFontSize()

float SoCallbackAction::getFontSize ( void ) const

Returns current font size setting.

◆ getLightAttenuation()

const SbVec3f & SoCallbackAction::getLightAttenuation ( void ) const

Returns current light attenuation setting.

◆ getLightModel()

SoLightModel::Model SoCallbackAction::getLightModel ( void ) const

Returns current light model setting.

◆ getLinePattern()

unsigned short SoCallbackAction::getLinePattern ( void ) const

Returns current line pattern setting.

◆ getLineWidth()

float SoCallbackAction::getLineWidth ( void ) const

Returns current line width setting.

◆ getMaterial()

void SoCallbackAction::getMaterial ( SbColor & ambient,
SbColor & diffuse,
SbColor & specular,
SbColor & emission,
float & shininess,
float & transparency,
const int index = 0 ) const

Returns current material settings.

◆ getMaterialBinding()

SoMaterialBinding::Binding SoCallbackAction::getMaterialBinding ( void ) const

Returns current material binding setting.

◆ getModelMatrix()

const SbMatrix & SoCallbackAction::getModelMatrix ( void ) const

Returns current model matrix.

◆ getNormal()

const SbVec3f & SoCallbackAction::getNormal ( const int index) const

Returns the normal vectors at index from the current state.

◆ getNormalBinding()

SoNormalBinding::Binding SoCallbackAction::getNormalBinding ( void ) const

Returns current normal binding setting.

◆ getNumCoordinates()

int32_t SoCallbackAction::getNumCoordinates ( void ) const

Returns current number of coordinates in the state.

◆ getNumNormals()

uint32_t SoCallbackAction::getNumNormals ( void ) const

Returns current number of normals in the state.

◆ getNumProfileCoordinates()

int32_t SoCallbackAction::getNumProfileCoordinates ( void ) const

Returns current number of profile coordinates in the state.

◆ getNumTextureCoordinates()

int32_t SoCallbackAction::getNumTextureCoordinates ( void ) const

Returns current number of texture coordinates in the traversal state.

◆ getPickStyle()

SoPickStyle::Style SoCallbackAction::getPickStyle ( void ) const

Returns current pick style setting.

◆ getPointSize()

float SoCallbackAction::getPointSize ( void ) const

Returns current point size setting.

◆ getProfile()

const SoNodeList & SoCallbackAction::getProfile ( void ) const

Returns current list of profile nodes.

◆ getProfileCoordinate2()

const SbVec2f & SoCallbackAction::getProfileCoordinate2 ( const int index) const

Returns current number of SbVec2f profile coordinates in the state.

◆ getProfileCoordinate3()

const SbVec3f & SoCallbackAction::getProfileCoordinate3 ( const int index) const

Returns current number of SbVec3f profile coordinates in the state.

◆ getProjectionMatrix()

const SbMatrix & SoCallbackAction::getProjectionMatrix ( void ) const

Returns current projection matrix.

◆ getShapeType()

SoShapeHints::ShapeType SoCallbackAction::getShapeType ( void ) const

Returns current shape type 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.

◆ getSwitch()

int32_t SoCallbackAction::getSwitch ( void ) const

Returns last SoSwitch::whichChild setting during the traversal.

◆ getTextureBlendColor()

const SbColor & SoCallbackAction::getTextureBlendColor ( void ) const

Returns current texture blend color setting.

◆ getTextureCoordinate2()

const SbVec2f & SoCallbackAction::getTextureCoordinate2 ( const int index) const

Returns SbVec2f texture coordinate at index from the texture coordinate pool of the traversal state.

◆ getTextureCoordinate3()

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

◆ getTextureCoordinate4()

const SbVec4f & SoCallbackAction::getTextureCoordinate4 ( const int index) const

Returns SbVec4f texture coordinate at index from the texture coordinate pool of the traversal state.

◆ getTextureCoordinateBinding()

SoTextureCoordinateBinding::Binding SoCallbackAction::getTextureCoordinateBinding ( void ) const

Returns current texture coordinate binding setting.

◆ getTextureImage() [1/2]

const unsigned char * SoCallbackAction::getTextureImage ( SbVec2s & size,
int & numcomps ) const

Returns current texture image settings.

◆ getTextureImage() [2/2]

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

◆ getTextureMatrix()

const SbMatrix & SoCallbackAction::getTextureMatrix ( void ) const

Returns current texture transformation matrix setting.

◆ getTextureModel()

SoTexture2::Model SoCallbackAction::getTextureModel ( void ) const

Returns current texture mapping model setting.

◆ getTextureWrapR()

SoTexture2::Wrap SoCallbackAction::getTextureWrapR ( void ) const

Returns current texture wrapping setting for the R coordinate.

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

◆ getTextureWrapS()

SoTexture2::Wrap SoCallbackAction::getTextureWrapS ( void ) const

Returns current texture wrapping setting for the S coordinate.

◆ getTextureWrapT()

SoTexture2::Wrap SoCallbackAction::getTextureWrapT ( void ) const

Returns current texture wrapping setting for the T coordinate.

◆ getTypeId()

SoType SoCallbackAction::getTypeId ( void ) const
virtual

Returns the type identification of an object derived from a class inheriting SoAction. This is used for runtime type checking and "downward" casting.

Implements SoAction.

Reimplemented in SoVectorizeAction, and SoVectorizePSAction.

◆ getUnits()

SoUnits::Units SoCallbackAction::getUnits ( void ) const

Returns current units setting.

◆ getVertexOrdering()

SoShapeHints::VertexOrdering SoCallbackAction::getVertexOrdering ( void ) const

Returns current vertex ordering shape hint 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.

◆ getViewingMatrix()

const SbMatrix & SoCallbackAction::getViewingMatrix ( void ) const

Returns current viewing matrix.

◆ getViewportRegion()

const SbViewportRegion & SoCallbackAction::getViewportRegion ( void ) const

Returns current viewport region setting.

This method is an extension versus the Open Inventor API.

◆ getViewVolume()

const SbViewVolume & SoCallbackAction::getViewVolume ( void ) const

Returns current view volume setting.

◆ initClass()

void SoCallbackAction::initClass ( void )
static

Initializes the runtime type system for this class, and sets up the enabled elements and action method list.

◆ invokeLineSegmentCallbacks()

void SoCallbackAction::invokeLineSegmentCallbacks ( const SoShape *const shape,
const SoPrimitiveVertex *const v1,
const SoPrimitiveVertex *const v2 )

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Invoke all "line segment generation" callbacks.

◆ invokePointCallbacks()

void SoCallbackAction::invokePointCallbacks ( const SoShape *const shape,
const SoPrimitiveVertex *const v )

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Invoke all "point" callbacks.

◆ invokePostCallbacks()

void SoCallbackAction::invokePostCallbacks ( const SoNode *const node)

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Invoke all "post traversal" callbacks.

◆ invokePreCallbacks()

void SoCallbackAction::invokePreCallbacks ( const SoNode *const node)

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Invoke all "pre traversal" callbacks.

◆ invokeTriangleCallbacks()

void SoCallbackAction::invokeTriangleCallbacks ( const SoShape *const shape,
const SoPrimitiveVertex *const v1,
const SoPrimitiveVertex *const v2,
const SoPrimitiveVertex *const v3 )

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Invoke all "triangle generation" callbacks.

◆ setCurrentNode()

void SoCallbackAction::setCurrentNode ( SoNode *const node)

Used from nodes during traversal to keep a current node pointer in the action.

◆ setViewportRegion()

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.

◆ shouldGeneratePrimitives()

SbBool SoCallbackAction::shouldGeneratePrimitives ( const SoShape * shape) const

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

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.


The documentation for this class was generated from the following files: