55#ifndef _SO_CALLBACK_ACTION_
56#define _SO_CALLBACK_ACTION_
243 int mtlIndex = 0)
const;
288 int &numComps)
const;
349 { currentNode = node;}
364 SbPList lineSegmentCallbackList;
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
void SoTriangleCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3)
Typedefs for callback routines used with the callbacks for generating primitives.
void SoLineSegmentCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2)
void SoPointCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v)
#define SO_ACTION_HEADER(className)
Macros to be called within the class definition header for an action subclass:
Character string stored in a hash table.
List of generic (void *) pointers.
Abstract base class for all actions.
Performs a generic traversal of the scene graph.
float getFocalDistance() const
Returns the current camera and viewing information from the state.
Response
Possible responses from a pre or post callback.
@ CONTINUE
Continue as usual.
@ ABORT
Stop traversing the rest of the graph.
bool shouldGeneratePrimitives(const SoShape *shape) const
Should primitives be generated for this shape?
SoDrawStyle::Style getDrawStyle() const
float getCreaseAngle() const
Returns the current shape hints from the state.
const SbVec4f & getCoordinate4(int index) const
Returns the current coordinates from the state.
void invokeTriangleCallbacks(const SoShape *shape, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3)
Call the primitive callbacks.
void invokePreCallbacks(const SoNode *node)
Call the pre-callbacks and post-callbacks.
Response getCurrentResponse() const
Returns the current response.
const unsigned char * getTextureImage(SbVec2s &size, int &numComps) const
Returns texture information from the state.
virtual ~SoCallbackAction()
Destructor.
const SbMatrix & getTextureMatrix() const
Returns the current texture mapping information from the state.
SoUnits::Units getUnits() const
void invokeLineSegmentCallbacks(const SoShape *shape, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2)
int32_t getNumNormals() const
Returns the current normal information from the state.
float getFontSize() const
Returns the current font information from the state.
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.
const SbColor & getTextureBlendColor() const
Returns texture 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.
const SbViewVolume & getViewVolume() const
Returns the current camera and viewing information from the state.
u_short getLinePattern() const
Returns the current drawing style information from the state.
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.
float getPointSize() const
Returns the current drawing style information from the state.
SoMaterialBinding::Binding getMaterialBinding() const
SoShapeHints::ShapeType getShapeType() const
const SbMatrix & getProjectionMatrix() const
Returns the current camera and viewing information from the state.
int32_t getNumProfileCoordinates() const
Returns the current profiles and their coordinates from the state.
int32_t getNumCoordinates() const
Returns the current coordinates from the state.
int32_t getNumTextureCoordinates() const
Returns 0 if texture coordinates are generated by a function.
float getComplexity() const
Accessing state information from callbacks.
void addPointCallback(SoType type, SoPointCB *cb, void *data)
SoTextureCoordinateBinding::Binding getTextureCoordinateBinding() const
float getLineWidth() const
Returns the current drawing style information from the state.
const SbName & getFontName() const
Returns the current font information from the state.
const SbVec2f & getTextureCoordinate2(int index) const
Returns texture information from the state.
SoLightModel::Model getLightModel() const
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 e...
void addTriangleCallback(SoType type, SoTriangleCB *cb, void *data)
Routines to add callbacks for generated primitives (triangles, line segments, and points) for all sha...
const SbVec4f & getTextureCoordinate4(int index) const
Returns texture information from the state.
const SbVec3f & getNormal(int index) const
Returns the current normal information from the state.
SoPickStyle::Style getPickStyle() const
void invokePostCallbacks(const SoNode *node)
const SbMatrix & getModelMatrix() const
Returns the current modeling transformation and the current units from the state.
void addPreCallback(SoType type, SoCallbackActionCB *cb, void *data)
Adding callback functions:
virtual void beginTraversal(SoNode *node)
Initiates action on graph.
void addLineSegmentCallback(SoType type, SoLineSegmentCB *cb, void *data)
void setCurrentNode(SoNode *node)
Set the current node during traversal:
const SoNodeList & getProfile() const
Returns the current profiles and their coordinates from the state.
SoTexture2::Wrap getTextureWrapS() const
SoTexture2::Wrap getTextureWrapT() const
const SbVec2f & getProfileCoordinate2(int index) const
Returns the current profiles and their coordinates from the state.
virtual SoNode * getCurPathTail()
Returns the node that caused the callback:
void addPostCallback(SoType type, SoCallbackActionCB *cb, void *data)
const SbVec3f & getCoordinate3(int index) const
Returns the current coordinates from the state.
SoShapeHints::VertexOrdering getVertexOrdering() const
const SbVec3f & getProfileCoordinate3(int index) const
Returns the current profiles and their coordinates from the state.
SoCallbackAction()
The constructor.
SoComplexity::Type getComplexityType() const
const SbMatrix & getViewingMatrix() const
Returns the current camera and viewing information from the state.
SoTexture2::Model getTextureModel() const
SoShapeHints::FaceType getFaceType() const
const SbVec3f & getLightAttenuation() const
Returns the current lighting model information from the state.
void invokePointCallbacks(const SoShape *shape, const SoPrimitiveVertex *v)
int32_t getSwitch() const
Returns the current switch value.
SoNormalBinding::Binding getNormalBinding() const
Maintains a list of pointers to nodes.
Abstract base class for all database nodes.
Represents a vertex of a generated primitive.
FaceType
Hints about faces of shape: if all faces are known to be convex or not.
VertexOrdering
Hints about ordering of face vertices: if ordering of all vertices of all faces is known to be consis...
ShapeType
Hints about entire shape: if shape is known to be a solid object, as opposed to a surface.
Abstract base class for all shape nodes.
SoType has no virtual functions to keep it small...