SoCallbackAction(3IV)

SoCallbackAction (SoCBAct) - performs a generic traversal of the scene graph

As shipped in IRIX 6.5.22. Added in IRIX 6.5.22.

NAME
     SoCallbackAction (SoCBAct) - performs a generic traversal of the scene
     graph

INHERITS FROM
     SoAction > SoCallbackAction

SYNOPSIS
     #include <Inventor_c/actions/SoCallbackAction.h>

     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)
     typedef SoCallbackAction::Response
                               SoCallbackActionCB(void *userData,
                                     SoCallbackAction *action,
                                     const SoNode *node)
     typedef SoCallbackAction  SoCBAct

     enum SoCallbackActionResponse {
          CONTINUE            Continue traversal as if nothing happened
          ABORT               Abort traversal
          PRUNE               Do not traverse node's children, but continue
                                   traversal
     }

          Functions from class SoCallbackAction:

     SoCallbackAction *          SoCBActCreate()
     void                        SoCBActAddPreCB(SoCBAct *this, SoType type,
                                      SoCallbackActionCB *cb, void *data)
     void                        SoCBActAddPostCB(SoCBAct *this, SoType type,
                                      SoCallbackActionCB *cb, void *data)
     void                        SoCBActAddPreTailCB(SoCBAct *this,
                                      SoCallbackActionCB *cb, void *data)
     void                        SoCBActAddPostTailCB(SoCBAct *this,
                                      SoCallbackActionCB *cb, void *data)
     void                        SoCBActAddTriCB(SoCBAct *this, SoType type,
                                      SoTriangleCB *cb, void *data)
     void                        SoCBActAddLineSegCB(SoCBAct *this, SoType
                                      type, SoLineSegmentCB *cb, void *data)
     void                        SoCBActAddPntCB(SoCBAct *this, SoType type,
                                      SoPointCB *cb, void *data)
     float                       SoCBActGetCmplx(const SoCBAct *this)
     SoComplexity::Type          SoCBActGetCmplxType(const SoCBAct *this)
     int32_t                     SoCBActGetNumCoord(const SoCBAct *this)
     const SbVec3f *             SoCBActGetCoord3(const SoCBAct *this, int
                                      index)
     const SbVec4f *             SoCBActGetCoord4(const SoCBAct *this, int
                                      index)
     SoDrawStyle::Style          SoCBActGetDrawStyle(const SoCBAct *this)
     unsigned short              SoCBActGetLinePattern(const SoCBAct *this)
     float                       SoCBActGetLineWidth(const SoCBAct *this)
     float                       SoCBActGetPointSize(const SoCBAct *this)
     const SbName *              SoCBActGetFontName(const SoCBAct *this)
     float                       SoCBActGetFontSize(const SoCBAct *this)
     SoLightModel::Model         SoCBActGetLModel(const SoCBAct *this)
     const SbVec3f *             SoCBActGetLtAtten(const SoCBAct *this)
     void                        SoCBActGetMtl(const SoCBAct *this, SbColor
                                      *ambient, SbColor *diffuse, SbColor
                                      *specular, SbColor *emission, float
                                      *shininess, float *transparency, int
                                      mtlIndex = 0)
     SoMaterialBinding::Binding  SoCBActGetMtlBind(const SoCBAct *this)
     long                        SoCBActGetNumNorms(const SoCBAct *this)
     const SbVec3f *             SoCBActGetNorms(const SoCBAct *this, int
                                      index)
     SoNormalBinding::Binding    SoCBActGetNormBind(const SoCBAct *this)
     int32_t                     SoCBActGetNumProfCoord(const SoCBAct *this)
     const SbVec2f *             SoCBActGetProfCoord2(const SoCBAct *this, int
                                      index)
     const SbVec3f *             SoCBActGetProfCoord3(const SoCBAct *this, int
                                      index)
     const SoNodeList *          SoCBActGetProf(const SoCBAct *this)
     SoShapeHints::VertexOrdering
                                 SoCBActGetVertOrder(const SoCBAct *this)
     SoShapeHints::ShapeType     SoCBActGetShapeType(const SoCBAct *this)
     SoShapeHints::FaceType      SoCBActGetFaceType(const SoCBAct *this)
     float                       SoCBActGetCreaseAngle(const SoCBAct *this)
     int32_t                     SoCBActGetNumTexCoord(const SoCBAct *this)
     const SbVec2f *             SoCBActGetTexCoord2(const SoCBAct *this, int
                                      index)
     const SbVec4f *             SoCBActGetTexCoord4(const SoCBAct *this, int
                                      index)
     SoTextureCoordinateBinding::Binding
                                 SoCBActGetTexCoordBind(const SoCBAct *this)
     const SbColor *             SoCBActGetTexBlendCol(const SoCBAct *this)
     const unsigned char *       SoCBActGetTexImage(const SoCBAct *this,
                                      SbVec2s *size, int *numComps)
     const SbMatrix *            SoCBActGetTexMx(const SoCBAct *this)
     SoTexture2::Model           SoCBActGetTexModel(const SoCBAct *this)
     SoTexture2::Wrap            SoCBActGetTexWrapS(const SoCBAct *this)
     SoTexture2::Wrap            SoCBActGetTexWrapT(const SoCBAct *this)
     const SbMatrix *            SoCBActGetModelMx(const SoCBAct *this)

     SoUnits::Units              SoCBActGetUnits(const SoCBAct *this)
     float                       SoCBActGetFocDist(const SoCBAct *this)
     const SbMatrix *            SoCBActGetProjMx(const SoCBAct *this)
     const SbMatrix *            SoCBActGetViewMx(const SoCBAct *this)
     const SbViewVolume *        SoCBActGetViewVol(const SoCBAct *this)
     SoPickStyle::Style          SoCBActGetPickStyle(const SoCBAct *this)
     int32_t                     SoCBActGetSwitch(const SoCBAct *this)

          Functions from class SoAction:

     void                SoCBActApply(SoCBAct *this, SoNode *node)
     void                SoCBActApplyPath(SoCBAct *this, SoPath *path)
     void                SoCBActApplyPathList(SoCBAct *this, const SoPathList
                              *pathList, SbBool obeysRules = FALSE)
     SoType              SoCBActGetClassTypeId()
     SoType              SoCBActGetTypeId(SoCBAct *this)
     SbBool              SoCBActIsOfType(SoCBAct *this, SoType type)
     void                SoCBActInvalidateState(SoCBAct *this)


DESCRIPTION
     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 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.

FUNCTIONS
     SoCallbackAction *          SoCBActCreate()
          The constructor.

     void                        SoCBActAddPreCB(SoCBAct *this, SoType type,
                                      SoCallbackActionCB *cb, void *data)
     void                        SoCBActAddPostCB(SoCBAct *this, 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.
     void                        SoCBActAddPreTailCB(SoCBAct *this,
                                      SoCallbackActionCB *cb, void *data)
     void                        SoCBActAddPostTailCB(SoCBAct *this,
                                      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.

     void                        SoCBActAddTriCB(SoCBAct *this, SoType type,
                                      SoTriangleCB *cb, void *data)
     void                        SoCBActAddLineSegCB(SoCBAct *this, SoType
                                      type, SoLineSegmentCB *cb, void *data)
     void                        SoCBActAddPntCB(SoCBAct *this, 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.

     float                       SoCBActGetCmplx(const SoCBAct *this)
     SoComplexity::Type          SoCBActGetCmplxType(const SoCBAct *this)
          Returns complexity information from the state.

     int32_t                     SoCBActGetNumCoord(const SoCBAct *this)
     const SbVec3f *             SoCBActGetCoord3(const SoCBAct *this, int
                                      index)
     const SbVec4f *             SoCBActGetCoord4(const SoCBAct *this, int
                                      index)
          Returns the current coordinates from the state.

     SoDrawStyle::Style          SoCBActGetDrawStyle(const SoCBAct *this)
     unsigned short              SoCBActGetLinePattern(const SoCBAct *this)
     float                       SoCBActGetLineWidth(const SoCBAct *this)
     float                       SoCBActGetPointSize(const SoCBAct *this)
          Returns the current drawing style information from the state.

     const SbName *              SoCBActGetFontName(const SoCBAct *this)
     float                       SoCBActGetFontSize(const SoCBAct *this)
          Returns the current font information from the state.

     SoLightModel::Model         SoCBActGetLModel(const SoCBAct *this)
     const SbVec3f *             SoCBActGetLtAtten(const SoCBAct *this)
          Returns the current lighting model information from the state.

     void                        SoCBActGetMtl(const SoCBAct *this, SbColor
                                      *ambient, SbColor *diffuse, SbColor
                                      *specular, SbColor *emission, float
                                      *shininess, float *transparency, int
                                      mtlIndex = 0)
     SoMaterialBinding::Binding  SoCBActGetMtlBind(const SoCBAct *this)
          Returns the current material information from the state. Providing a
          mtlIndex will return the material defined for that index.
     long                        SoCBActGetNumNorms(const SoCBAct *this)
     const SbVec3f *             SoCBActGetNorms(const SoCBAct *this, int
                                      index)
     SoNormalBinding::Binding    SoCBActGetNormBind(const SoCBAct *this)
          Returns the current normal information from the state.

     int32_t                     SoCBActGetNumProfCoord(const SoCBAct *this)
     const SbVec2f *             SoCBActGetProfCoord2(const SoCBAct *this, int
                                      index)
     const SbVec3f *             SoCBActGetProfCoord3(const SoCBAct *this, int
                                      index)
     const SoNodeList *          SoCBActGetProf(const SoCBAct *this)
          Returns the current profiles and their coordinates from the state.

     SoShapeHints::VertexOrdering
                                 SoCBActGetVertOrder(const SoCBAct *this)
     SoShapeHints::ShapeType     SoCBActGetShapeType(const SoCBAct *this)
     SoShapeHints::FaceType      SoCBActGetFaceType(const SoCBAct *this)
     float                       SoCBActGetCreaseAngle(const SoCBAct *this)
          Returns the current shape hints from the state.

     int32_t                     SoCBActGetNumTexCoord(const SoCBAct *this)
     const SbVec2f *             SoCBActGetTexCoord2(const SoCBAct *this, int
                                      index)
     const SbVec4f *             SoCBActGetTexCoord4(const SoCBAct *this, int
                                      index)
     SoTextureCoordinateBinding::Binding
                                 SoCBActGetTexCoordBind(const SoCBAct *this)
     const SbColor *             SoCBActGetTexBlendCol(const SoCBAct *this)
     const unsigned char *       SoCBActGetTexImage(const SoCBAct *this,
                                      SbVec2s *size, int *numComps)
          Returns texture information from the state.  SoCBActGetNumTexCoord()
          returns 0 if texture coordinates are generated by a function.
          SoCBActGetTexImage() returns NULL if no texture is enabled.

     const SbMatrix *            SoCBActGetTexMx(const SoCBAct *this)
     SoTexture2::Model           SoCBActGetTexModel(const SoCBAct *this)
     SoTexture2::Wrap            SoCBActGetTexWrapS(const SoCBAct *this)
     SoTexture2::Wrap            SoCBActGetTexWrapT(const SoCBAct *this)
          Returns the current texture mapping information from the state.

     const SbMatrix *            SoCBActGetModelMx(const SoCBAct *this)
     SoUnits::Units              SoCBActGetUnits(const SoCBAct *this)
          Returns the current modeling transformation and the current units
          from the state.

     float                       SoCBActGetFocDist(const SoCBAct *this)
     const SbMatrix *            SoCBActGetProjMx(const SoCBAct *this)
     const SbMatrix *            SoCBActGetViewMx(const SoCBAct *this)
     const SbViewVolume *        SoCBActGetViewVol(const SoCBAct *this)
          Returns the current camera and viewing information from the state.

     SoPickStyle::Style          SoCBActGetPickStyle(const SoCBAct *this)
          Returns the current picking style.

     int32_t                     SoCBActGetSwitch(const SoCBAct *this)
          Returns the current switch value.


SEE ALSO
     SoCallback, SoEventCallback, SoShape