Public Types |
enum | Response { CONTINUE,
ABORT,
PRUNE
} |
| Possible responses from a pre or post callback. More...
|
typedef Response | SoCallbackActionCB (void *userData, SoCallbackAction *action, const SoNode *node) |
| The SoCallbackActionCB typedef is defined within the class, since it needs to refer to the Response enumerated type.
|
Public Member Functions |
| SoCallbackAction () |
| The constructor.
|
virtual | ~SoCallbackAction () |
| Destructor.
|
void | addPreCallback (SoType type, SoCallbackActionCB *cb, void *data) |
| Adding callback functions:
|
void | addPostCallback (SoType type, SoCallbackActionCB *cb, void *data) |
void | addPreTailCallback (SoCallbackActionCB *cb, void *data) |
| These can be used to set up callback functions to call when the action is applied to a path.
|
void | addPostTailCallback (SoCallbackActionCB *cb, void *data) |
| These can be used to set up callback functions to call when the action is applied to a path.
|
void | addTriangleCallback (SoType type, SoTriangleCB *cb, void *data) |
| Routines to add callbacks for generated primitives (triangles, line segments, and points) for all shapes of the given type.
|
void | addLineSegmentCallback (SoType type, SoLineSegmentCB *cb, void *data) |
void | addPointCallback (SoType type, SoPointCB *cb, void *data) |
float | getComplexity () const |
| Accessing state information from callbacks.
|
SoComplexity::Type | getComplexityType () const |
int32_t | getNumCoordinates () const |
| Returns the current coordinates from the state.
|
const SbVec3f & | getCoordinate3 (int index) const |
| Returns the current coordinates from the state.
|
const SbVec4f & | getCoordinate4 (int index) const |
| Returns the current coordinates from the state.
|
SoDrawStyle::Style | getDrawStyle () const |
u_short | getLinePattern () const |
| Returns the current drawing style information from the state.
|
float | getLineWidth () const |
| Returns the current drawing style information from the state.
|
float | getPointSize () const |
| Returns the current drawing style information from the state.
|
const SbName & | getFontName () const |
| Returns the current font information from the state.
|
float | getFontSize () const |
| Returns the current font information from the state.
|
SoLightModel::Model | getLightModel () const |
const SbVec3f & | getLightAttenuation () const |
| Returns the current lighting model information from the state.
|
void | getMaterial (SbColor &ambient, SbColor &diffuse, SbColor &specular, SbColor &emission, float &shininess, float &transparency, int mtlIndex=0) const |
| Returns the current material information from the state.
|
SoMaterialBinding::Binding | getMaterialBinding () const |
int32_t | getNumNormals () const |
| Returns the current normal information from the state.
|
const SbVec3f & | getNormal (int index) const |
| Returns the current normal information from the state.
|
SoNormalBinding::Binding | getNormalBinding () const |
int32_t | getNumProfileCoordinates () const |
| Returns the current profiles and their coordinates from the state.
|
const SbVec2f & | getProfileCoordinate2 (int index) const |
| Returns the current profiles and their coordinates from the state.
|
const SbVec3f & | getProfileCoordinate3 (int index) const |
| Returns the current profiles and their coordinates from the state.
|
const SoNodeList & | getProfile () const |
| Returns the current profiles and their coordinates from the state.
|
SoShapeHints::VertexOrdering | getVertexOrdering () const |
SoShapeHints::ShapeType | getShapeType () const |
SoShapeHints::FaceType | getFaceType () const |
float | getCreaseAngle () const |
| Returns the current shape hints from the state.
|
int32_t | getNumTextureCoordinates () const |
| Returns 0 if texture coordinates are generated by a function.
|
const SbVec2f & | getTextureCoordinate2 (int index) const |
| Returns texture information from the state.
|
const SbVec4f & | getTextureCoordinate4 (int index) const |
| Returns texture information from the state.
|
SoTextureCoordinateBinding::Binding | getTextureCoordinateBinding () const |
const SbColor & | getTextureBlendColor () const |
| Returns texture information from the state.
|
const unsigned char * | getTextureImage (SbVec2s &size, int &numComps) const |
| Returns texture information from the state.
|
const SbMatrix & | getTextureMatrix () const |
| Returns the current texture mapping information from the state.
|
SoTexture2::Model | getTextureModel () const |
SoTexture2::Wrap | getTextureWrapS () const |
SoTexture2::Wrap | getTextureWrapT () const |
const SbMatrix & | getModelMatrix () const |
| Returns the current modeling transformation and the current units from the state.
|
SoUnits::Units | getUnits () const |
float | getFocalDistance () const |
| Returns the current camera and viewing information from the state.
|
const SbMatrix & | getProjectionMatrix () const |
| Returns the current camera and viewing information from the state.
|
const SbMatrix & | getViewingMatrix () const |
| Returns the current camera and viewing information from the state.
|
const SbViewVolume & | getViewVolume () const |
| Returns the current camera and viewing information from the state.
|
SoPickStyle::Style | getPickStyle () const |
int32_t | getSwitch () const |
| Returns the current switch value.
|
Response | getCurrentResponse () const |
| Returns the current response.
|
void | invokePreCallbacks (const SoNode *node) |
| Call the pre-callbacks and post-callbacks.
|
void | invokePostCallbacks (const SoNode *node) |
void | invokeTriangleCallbacks (const SoShape *shape, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3) |
| Call the primitive callbacks.
|
void | invokeLineSegmentCallbacks (const SoShape *shape, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2) |
void | invokePointCallbacks (const SoShape *shape, const SoPrimitiveVertex *v) |
SbBool | shouldGeneratePrimitives (const SoShape *shape) const |
| Should primitives be generated for this shape?
|
virtual SoNode * | getCurPathTail () |
| Returns the node that caused the callback:
|
void | setCurrentNode (SoNode *node) |
| Set the current node during traversal:
|
Static Public Member Functions |
static void | initClass () |
Protected Member Functions |
virtual void | beginTraversal (SoNode *node) |
| Initiates action on graph.
|
This action defines a generic traversal of the scene graph. The user can specify callback functions for node types or paths; when those node types or paths are encountered during traversal, the user's callback function is called.
In addition, callback functions can be registered for primitives generated by shapes in the scene graph. Most shape types can generate primitives that represent or approximate their geometries. Triangle primitives are used for all surfaces (such as cubes, face sets, or 3D text), line segment primitives are used for line shapes, and point primitives are used for point shapes. Note that the type of primitives generated for a shape is the same, regardless of drawing style or other properties.
Most of the methods on this class access information from the traversal state. They should be called only by callback functions that are invoked during traversal, so there is a valid state to work with.
- See Also
- SoCallback, SoEventCallback, SoShape
Definition at line 126 of file SoCallbackAction.h.