NAME SoCallbackAction SoCBAct "" { performs a generic traversal of the scene graph } INCLUDE actions/SoCallbackAction.h DESC { 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. \p 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. \eTriangle\. primitives are used for all surfaces (such as cubes, face sets, or 3D text), \eline segment\. primitives are used for line shapes, and \epoint\. 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. \p Most of the \+methods\.\-functions\. 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. } TYPEDEF void SoTriangleCB "(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3)" TYPEDEF void SoLineSegmentCB "(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2)" TYPEDEF void SoPointCB "(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v)" ENUM Response { CONTINUE "Continue traversal as if nothing happened", ABORT "Abort traversal", PRUNE "Do not traverse node's children, but continue traversal" } TYPEDEF SoCallbackAction::Response SoCallbackActionCB "(void *userData, SoCallbackAction *action, const SoNode *node)" METHOD "" SoCallbackAction() { The constructor. } METHOD addPreCB void addPreCallback(SoType type, SoCallbackActionCB *cb, void *data) {} METHOD addPostCB void addPostCallback(SoType type, SoCallbackActionCB *cb, void *data) { These add a callback function to call when a node of the given type is encountered during traversal. The PreCallback is called just before the node is traversed, and the PostCallback is called just after. The value returned by a callback function indicates whether the action should continue with the traversal. } METHOD addPreTailCB void addPreTailCallback(SoCallbackActionCB *cb, void *data) {} METHOD addPostTailCB 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. The functions are called just before or after the node at the tail of the path is traversed. } METHOD addTriCB void addTriangleCallback(SoType type, SoTriangleCB *cb, void *data) {} METHOD addLineSegCB void addLineSegmentCallback(SoType type, SoLineSegmentCB *cb, void *data) {} METHOD addPntCB void addPointCallback(SoType type, SoPointCB *cb, void *data) { Routines to add callbacks for generated primitives (triangles, line segments, and points) for all shapes of the given type. The callback function will be called for each primitive generated for all shapes of or derived from that type. } METHOD getCmplx float getComplexity() const {} METHOD getCmplxType SoComplexity::Type getComplexityType() const { Returns complexity information from the state. } METHOD getNumCoord int32_t getNumCoordinates() const {} METHOD getCoord3 const SbVec3f & getCoordinate3(int index) const {} METHOD getCoord4 const SbVec4f & getCoordinate4(int index) const { Returns the current coordinates from the state. } METHOD "" SoDrawStyle::Style getDrawStyle() const {} METHOD "" unsigned short getLinePattern() const {} METHOD "" float getLineWidth() const {} METHOD "" float getPointSize() const { Returns the current drawing style information from the state. } METHOD "" const SbName & getFontName() const {} METHOD "" float getFontSize() const { Returns the current font information from the state. } METHOD getLModel SoLightModel::Model getLightModel() const {} METHOD getLtAtten const SbVec3f & getLightAttenuation() const { Returns the current lighting model information from the state. } METHOD getMtl void getMaterial( SbColor &ambient, SbColor &diffuse, SbColor &specular, SbColor &emission, float &shininess, float &transparency, int mtlIndex = 0) const {} METHOD getMtlBind SoMaterialBinding::Binding getMaterialBinding() const { Returns the current material information from the state. Providing a \amtlIndex\. will return the material defined for that index. } METHOD getNumNorms long getNumNormals() const {} METHOD getNorms const SbVec3f & getNormal(int index) const {} METHOD getNormBind SoNormalBinding::Binding getNormalBinding() const { Returns the current normal information from the state. } METHOD getNumProfCoord int32_t getNumProfileCoordinates() const {} METHOD getProfCoord2 const SbVec2f & getProfileCoordinate2(int index) const {} METHOD getProfCoord3 const SbVec3f & getProfileCoordinate3(int index) const {} METHOD getProf const SoNodeList & getProfile() const { Returns the current profiles and their coordinates from the state. } METHOD getVertOrder SoShapeHints::VertexOrdering getVertexOrdering() const {} METHOD "" SoShapeHints::ShapeType getShapeType() const {} METHOD "" SoShapeHints::FaceType getFaceType() const {} METHOD "" float getCreaseAngle() const { Returns the current shape hints from the state. } METHOD getNumTexCoord int32_t getNumTextureCoordinates() const {} METHOD getTexCoord2 const SbVec2f & getTextureCoordinate2(int index) const {} METHOD getTexCoord4 const SbVec4f & getTextureCoordinate4(int index) const {} METHOD getTexCoordBind SoTextureCoordinateBinding::Binding getTextureCoordinateBinding() const {} METHOD getTexBlendCol const SbColor & getTextureBlendColor() const {} METHOD getTexImage const unsigned char * getTextureImage(SbVec2s &size, int &numComps) const { Returns texture information from the state. \m\+getNumTextureCoordinates()\.\. \m\-SoCBActGetNumTexCoord()\.\. returns 0 if texture coordinates are generated by a function. \m\+getTextureImage()\.\. \m\-SoCBActGetTexImage()\.\. returns NULL if no texture is enabled. } METHOD getTexMx const SbMatrix & getTextureMatrix() const {} METHOD getTexModel SoTexture2::Model getTextureModel() const {} METHOD getTexWrapS SoTexture2::Wrap getTextureWrapS() const {} METHOD getTexWrapT SoTexture2::Wrap getTextureWrapT() const { Returns the current texture mapping information from the state. } METHOD getModelMx const SbMatrix & getModelMatrix() const {} METHOD "" SoUnits::Units getUnits() const { Returns the current modeling transformation and the current units from the state. } METHOD getFocDist float getFocalDistance() const {} METHOD getProjMx const SbMatrix & getProjectionMatrix() const {} METHOD getViewMx const SbMatrix & getViewingMatrix() const {} METHOD getViewVol const SbViewVolume & getViewVolume() const { Returns the current camera and viewing information from the state. } METHOD "" SoPickStyle::Style getPickStyle() const { Returns the current picking style. } METHOD "" int32_t getSwitch() const { Returns the current switch value. } ALSO { SoCallback, SoEventCallback, SoShape }