GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOCALLBACKACTION (3)

NAME

SoCallbackAction — performs a generic traversal of the scene graph

CONTENTS

Inherits From
Synopsis
Description
Methods
See Also

INHERITS FROM

SoAction > SoCallbackAction

SYNOPSIS

#include <Inventor/actions/SoCallbackAction.h>

    typedef void    
                    
typedef void         SoTriangleCB(void *userData,
SoCallbackAction *action,
const SoPrimitiveVertex *v1,
const SoPrimitiveVertex *v2,
const SoPrimitiveVertex *v3)    
typedef void    
                    
typedef void         SoLineSegmentCB(void *userData,
SoCallbackAction *action,
const SoPrimitiveVertex *v1,
const SoPrimitiveVertex *v2)    
typedef void    
                    
typedef void         SoPointCB(void *userData,
SoCallbackAction *action,
const SoPrimitiveVertex *v)    
typedef SoCallbackAction::Response    
                    
typedef SoCallbackAction::Response SoCallbackActionCB(void *userData,
SoCallbackAction *action,
const SoNode *node)

enum Response {     SoCallbackAction::CONTINUE    
                             SoCallbackAction::CONTINUE   Continue traversal as if nothing happened    
SoCallbackAction::ABORT    
                             SoCallbackAction::ABORT      Abort traversal    
SoCallbackAction::PRUNE    
                             SoCallbackAction::PRUNE      Do not traverse node’s children, but continue traversal
}

Methods from class SoCallbackAction:

       
                            
                             SoCallbackAction()    
void    
                            
void                         addPreCallback(SoType type, SoCallbackActionCB *cb, void *data)    
void    
                            
void                         addPostCallback(SoType type, SoCallbackActionCB *cb, void *data)    
void    
                            
void                         addPreTailCallback(SoCallbackActionCB *cb, void *data)    
void    
                            
void                         addPostTailCallback(SoCallbackActionCB *cb, void *data)    
void    
                            
void                         addTriangleCallback(SoType type, SoTriangleCB *cb, void *data)    
void    
                            
void                         addLineSegmentCallback(SoType type, SoLineSegmentCB *cb, void *data)    
void    
                            
void                         addPointCallback(SoType type, SoPointCB *cb, void *data)    
float    
                            
float                        getComplexity() const    
SoComplexity::Type    
                            
SoComplexity::Type           getComplexityType() const    
int32_t    
                            
int32_t                      getNumCoordinates() const    
const SbVec3f &    
                            
const SbVec3f &              getCoordinate3(int index) const    
const SbVec4f &    
                            
const SbVec4f &              getCoordinate4(int index) const    
SoDrawStyle::Style    
                            
SoDrawStyle::Style           getDrawStyle() const    
unsigned short    
                            
unsigned short               getLinePattern() const    
float    
                            
float                        getLineWidth() const    
float    
                            
float                        getPointSize() const    
const SbName &    
                            
const SbName &               getFontName() const    
float    
                            
float                        getFontSize() const    
SoLightModel::Model    
                            
SoLightModel::Model          getLightModel() const    
const SbVec3f &    
                            
const SbVec3f &              getLightAttenuation() const    
void    
                            
void                         getMaterial(SbColor &ambient, SbColor &diffuse, SbColor &specular, SbColor &emission, float &shininess, float &transparency, int mtlIndex = 0) const    
SoMaterialBinding::Binding    
                            
SoMaterialBinding::Binding   getMaterialBinding() const    
long    
                            
long                         getNumNormals() const    
const SbVec3f &    
                            
const SbVec3f &              getNormal(int index) const    
SoNormalBinding::Binding    
                            
SoNormalBinding::Binding     getNormalBinding() const    
int32_t    
                            
int32_t                      getNumProfileCoordinates() const    
const SbVec2f &    
                            
const SbVec2f &              getProfileCoordinate2(int index) const    
const SbVec3f &    
                            
const SbVec3f &              getProfileCoordinate3(int index) const    
const SoNodeList &    
                            
const SoNodeList &           getProfile() const    
SoShapeHints::VertexOrdering    
                            
SoShapeHints::VertexOrdering getVertexOrdering() const    
SoShapeHints::ShapeType    
                            
SoShapeHints::ShapeType      getShapeType() const    
SoShapeHints::FaceType    
                            
SoShapeHints::FaceType       getFaceType() const    
float    
                            
float                        getCreaseAngle() const    
int32_t    
                            
int32_t                      getNumTextureCoordinates() const    
const SbVec2f &    
                            
const SbVec2f &              getTextureCoordinate2(int index) const    
const SbVec4f &    
                            
const SbVec4f &              getTextureCoordinate4(int index) const    
SoTextureCoordinateBinding::Binding    
                            
SoTextureCoordinateBinding::Binding getTextureCoordinateBinding() const    
const SbColor &    
                            
const SbColor &              getTextureBlendColor() const    
const unsigned char *    
                            
const unsigned char *        getTextureImage(SbVec2s &size, int &numComps) const    
const SbMatrix &    
                            
const SbMatrix &             getTextureMatrix() const    
SoTexture2::Model    
                            
SoTexture2::Model            getTextureModel() const    
SoTexture2::Wrap    
                            
SoTexture2::Wrap             getTextureWrapS() const    
SoTexture2::Wrap    
                            
SoTexture2::Wrap             getTextureWrapT() const    
const SbMatrix &    
                            
const SbMatrix &             getModelMatrix() const    
SoUnits::Units    
                            
SoUnits::Units               getUnits() const    
float    
                            
float                        getFocalDistance() const    
const SbMatrix &    
                            
const SbMatrix &             getProjectionMatrix() const    
const SbMatrix &    
                            
const SbMatrix &             getViewingMatrix() const    
const SbViewVolume &    
                            
const SbViewVolume &         getViewVolume() const    
SoPickStyle::Style    
                            
SoPickStyle::Style           getPickStyle() const    
int32_t    
                            
int32_t                      getSwitch() const

Methods from class SoAction:

    virtual void    
                    
virtual void         apply(SoNode *node)    
virtual void    
                    
virtual void         apply(SoPath *path)    
virtual void    
                    
virtual void         apply(const SoPathList &pathList, SbBool obeysRules = FALSE)    
static SoType    
                    
static SoType        getClassTypeId()    
virtual SoType    
                    
virtual SoType       getTypeId()    
virtual SbBool    
                    
virtual SbBool       isOfType(SoType type)    
virtual void    
                    
virtual void         invalidateState()

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

METHODS

       
                            
                             SoCallbackAction()
The constructor.

    void    
                            
void                         addPreCallback(SoType type, SoCallbackActionCB *cb, void *data)    
void    
                            
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.

    void    
                            
void                         addPreTailCallback(SoCallbackActionCB *cb, void *data)    
void    
                            
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.

    void    
                            
void                         addTriangleCallback(SoType type, SoTriangleCB *cb, void *data)    
void    
                            
void                         addLineSegmentCallback(SoType type, SoLineSegmentCB *cb, void *data)    
void    
                            
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.

    float    
                            
float                        getComplexity() const    
SoComplexity::Type    
                            
SoComplexity::Type           getComplexityType() const
Returns complexity information from the state.

    int32_t    
                            
int32_t                      getNumCoordinates() const    
const SbVec3f &    
                            
const SbVec3f &              getCoordinate3(int index) const    
const SbVec4f &    
                            
const SbVec4f &              getCoordinate4(int index) const
Returns the current coordinates from the state.

    SoDrawStyle::Style    
                            
SoDrawStyle::Style           getDrawStyle() const    
unsigned short    
                            
unsigned short               getLinePattern() const    
float    
                            
float                        getLineWidth() const    
float    
                            
float                        getPointSize() const
Returns the current drawing style information from the state.

    const SbName &    
                            
const SbName &               getFontName() const    
float    
                            
float                        getFontSize() const
Returns the current font information from the state.

    SoLightModel::Model    
                            
SoLightModel::Model          getLightModel() const    
const SbVec3f &    
                            
const SbVec3f &              getLightAttenuation() const
Returns the current lighting model information from the state.

    void    
                            
void                         getMaterial(SbColor &ambient, SbColor &diffuse, SbColor &specular, SbColor &emission, float &shininess, float &transparency, int mtlIndex = 0) const    
SoMaterialBinding::Binding    
                            
SoMaterialBinding::Binding   getMaterialBinding() const
Returns the current material information from the state. Providing a mtlIndex will return the material defined for that index.

    long    
                            
long                         getNumNormals() const    
const SbVec3f &    
                            
const SbVec3f &              getNormal(int index) const    
SoNormalBinding::Binding    
                            
SoNormalBinding::Binding     getNormalBinding() const
Returns the current normal information from the state.

    int32_t    
                            
int32_t                      getNumProfileCoordinates() const    
const SbVec2f &    
                            
const SbVec2f &              getProfileCoordinate2(int index) const    
const SbVec3f &    
                            
const SbVec3f &              getProfileCoordinate3(int index) const    
const SoNodeList &    
                            
const SoNodeList &           getProfile() const
Returns the current profiles and their coordinates from the state.

    SoShapeHints::VertexOrdering    
                            
SoShapeHints::VertexOrdering getVertexOrdering() const    
SoShapeHints::ShapeType    
                            
SoShapeHints::ShapeType      getShapeType() const    
SoShapeHints::FaceType    
                            
SoShapeHints::FaceType       getFaceType() const    
float    
                            
float                        getCreaseAngle() const
Returns the current shape hints from the state.

    int32_t    
                            
int32_t                      getNumTextureCoordinates() const    
const SbVec2f &    
                            
const SbVec2f &              getTextureCoordinate2(int index) const    
const SbVec4f &    
                            
const SbVec4f &              getTextureCoordinate4(int index) const    
SoTextureCoordinateBinding::Binding    
                            
SoTextureCoordinateBinding::Binding getTextureCoordinateBinding() const    
const SbColor &    
                            
const SbColor &              getTextureBlendColor() const    
const unsigned char *    
                            
const unsigned char *        getTextureImage(SbVec2s &size, int &numComps) const
Returns texture information from the state. getNumTextureCoordinates() returns 0 if texture coordinates are generated by a function. getTextureImage() returns NULL if no texture is enabled.

    const SbMatrix &    
                            
const SbMatrix &             getTextureMatrix() const    
SoTexture2::Model    
                            
SoTexture2::Model            getTextureModel() const    
SoTexture2::Wrap    
                            
SoTexture2::Wrap             getTextureWrapS() const    
SoTexture2::Wrap    
                            
SoTexture2::Wrap             getTextureWrapT() const
Returns the current texture mapping information from the state.

    const SbMatrix &    
                            
const SbMatrix &             getModelMatrix() const    
SoUnits::Units    
                            
SoUnits::Units               getUnits() const
Returns the current modeling transformation and the current units from the state.

    float    
                            
float                        getFocalDistance() const    
const SbMatrix &    
                            
const SbMatrix &             getProjectionMatrix() const    
const SbMatrix &    
                            
const SbMatrix &             getViewingMatrix() const    
const SbViewVolume &    
                            
const SbViewVolume &         getViewVolume() const
Returns the current camera and viewing information from the state.

    SoPickStyle::Style    
                            
SoPickStyle::Style           getPickStyle() const
Returns the current picking style.

    int32_t    
                            
int32_t                      getSwitch() const
Returns the current switch value.

SEE ALSO

SoCallback, SoEventCallback, SoShape

Search for    or go to Top of page |  Section 3 |  Main Index


SOCALLBACKACTION(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.