|
| 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) |
|
bool | 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:
|
|
virtual | ~SoAction () |
| Destructor.
|
|
virtual SoType | getTypeId () const =0 |
| Returns the type identifier for a specific instance.
|
|
bool | isOfType (SoType type) const |
| Returns TRUE if this instance is of the type specified in type or is derived from that type.
|
|
virtual void | apply (SoNode *node) |
|
virtual void | apply (SoPath *path) |
|
virtual void | apply (const SoPathList &pathList, bool obeysRules=FALSE) |
| Initiates an action on the graph defined either by a node, path, or list of paths.
|
|
virtual void | invalidateState () |
| Invalidates the current traversal state in the action, forcing it to be recreated when the action is next applied.
|
|
AppliedCode | getWhatAppliedTo () const |
| Returns code indicating what action is being applied to.
|
|
SoNode * | getNodeAppliedTo () const |
| These returns a pointer to the node, path, or path list the action is being applied to.
|
|
SoPath * | getPathAppliedTo () const |
|
const SoPathList * | getPathListAppliedTo () const |
| A single path list may be split into several, one for each different head node.
|
|
const SoPathList * | getOriginalPathListAppliedTo () const |
|
bool | isLastPathListAppliedTo () const |
|
PathCode | getPathCode (int &numIndices, const int *&indices) |
| Returns path code based on where current node (the node at the end of the current path) lies with respect to the path(s) the action is being applied to.
|
|
void | traverse (SoNode *node) |
| Does traversal of a graph rooted by a node.
|
|
bool | hasTerminated () const |
| Returns TRUE if the traversal has reached a termination condition.
|
|
const SoPath * | getCurPath () |
| Returns a pointer to the path accumulated during traversal, i.e., the chain of nodes from the root of the traversed graph to the current node being traversed.
|
|
SoState * | getState () const |
| Get the state from the action.
|
|
PathCode | getCurPathCode () const |
| These methods maintain the current path accumulated so far during traversal.
|
|
void | pushCurPath (int childIndex) |
|
void | popCurPath (PathCode prevPathCode) |
|
virtual SoNode * | getCurPathTail () |
| This is virtual, so that SoCallbackAction can use current node.
|
|
void | usePathCode (int &numIndices, const int *&indices) |
| called by inline getPathCode:
|
|
void | pushCurPath () |
| Optimized versions of push/pop when we know path codes won't change:
|
|
void | popPushCurPath (int childIndex) |
|
void | popCurPath () |
|
const SoLightweightPath & | getCurrentLightweightPath () const |
| Returns the current "light" path.
|
|
void | setCurrentLightweightPath (const SoLightweightPath &path) |
| Sets the current "light" path.
|
|
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.