51#ifndef _SO_CALLBACK_ACTION_
52#define _SO_CALLBACK_ACTION_
106typedef int SoCallbackActionCB2(
void *userData,
337#ifndef HIDDEN_FROM_DOC
510 int mtlIndex = 0)
const;
725 Response getCurrentResponse()
const {
return response; }
728 virtual void invokePreCallbacks(
const SoNode *node);
729 virtual void invokePostCallbacks(
const SoNode *node);
732 virtual void invokeTriangleCallbacks(
const SoShape *shape,
736 virtual void invokeLineSegmentCallbacks(
const SoShape *shape,
739 virtual void invokePointCallbacks(
const SoShape *shape,
743 virtual SbBool shouldGeneratePrimitives(
const SoShape *shape)
const;
750 static SbBool duringCallbackAll;
751 static void initClass();
752 static void exitClass();
755 virtual SoNode *getCurPathTail();
758 void setCurrentNode(
SoNode *node)
759 { currentNode = node;}
819 ANY=PRE|POST|PRE_TAIL|POST_TAIL,
824 template<
class T,
int N >
829 virtual void beginTraversal(
SoNode *node);
849 SbPList lineSegmentCallbackList;
void SoTriangleCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3)
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)
Character string stored in a hash table.
List of generic (void *) pointers.
Class for smart character strings.
Abstract base class for all actions.
Performs a generic traversal of a scene graph or path.
float getFocalDistance() const
Returns the current camera and viewing information from the state.
Response
Possible responses from a pre or post callback.
@ PRUNE
Do not traverse node's children, but continue traversal.
@ CONTINUE
Continue traversal as if nothing happened.
const SbName & getTextureFileName() const
Returns texture information from the state.
const SbString & getFontName() const
Returns the current font information from the state.
SoDrawStyle::Style getDrawStyle() const
Returns the current drawing style information from the state.
float getCreaseAngle() const
Returns the current shape hints from the state.
const SbVec4f & getCoordinate4(int index) const
Returns the current coordinates from the state.
SoDEPRECATED const unsigned char * getTextureImage(SbVec2s &size, int &numComps) const
Returns texture information from the state.
SoTexture::Model getTextureModel() const
Returns the current texture mapping information from the state.
float getDecimationPercentage() const
Returns the current decimation percentage from the state.
SbBool isCallbackAll() const
Returns whether the callback uses normal traversal (switches, etc.) or whether it traverses every sin...
const SbMatrix & getTextureMatrix() const
Returns the current texture mapping information from the state.
SoUnits::Units getUnits() const
Returns the current units from the state.
SoGLRenderAction::TransparencyType getTransparencyType() const
Returns the current Transparency Type information from the state.
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)
Sets up a callback function to call when the action is applied to a path.
const SbColor & getTextureBlendColor() const
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.
SoTexture::Wrap getTextureWrapT() const
Returns the current texture mapping 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)
Sets up a callback function 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
Returns the current material information from the state.
SoShapeHints::ShapeType getShapeType() const
Returns the current shape hints from the state.
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 texture information from the state.
float getComplexity() const
Returns complexity information from the state.
void addPointCallback(SoType type, SoPointCB *cb, void *data)
Routine to add callbacks for generated primitives (points) for all shapes of the given type.
SoTextureCoordinateBinding::Binding getTextureCoordinateBinding() const
Returns texture information from the state.
float getLineWidth() const
Returns the current drawing style information from the state.
const SbVec2f & getTextureCoordinate2(int index) const
Returns texture information from the state.
SoLightModel::Model getLightModel() const
Returns the current lighting model information from the state.
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)
Routine to add callbacks for generated primitives (triangles) for all shapes of the given type.
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
Returns the current picking style.
const SbMatrix & getModelMatrix() const
Returns the current modeling transformation from the state.
void addPreCallback(SoType type, SoCallbackActionCB *cb, void *data)
Adds a callback function to call when a node of the given type is encountered during traversal.
const SoTexture2Transform * getTextureTransformNode() const
Returns the current texture mapping information from the state.
void addLineSegmentCallback(SoType type, SoLineSegmentCB *cb, void *data)
Routine to add callbacks for generated primitives (line segments) for all shapes of the given type.
const SoNodeList & getProfile() const
Returns the current profiles and their coordinates from the state.
const unsigned char * getTextureImage(SbVec2i32 &size, int &numComps) const
Returns texture information from the state.
const SbVec2f & getProfileCoordinate2(int index) const
Returns the current profiles and their coordinates from the state.
void addPostCallback(SoType type, SoCallbackActionCB *cb, void *data)
Adds a callback function to call when a node of the given type is encountered during traversal.
const SbVec3f & getCoordinate3(int index) const
Returns the current coordinates from the state.
SoShapeHints::VertexOrdering getVertexOrdering() const
Returns the current shape hints from the state.
SoDecimationTypeElement::Type getDecimationType() const
Returns the current decimation type from the state.
const SbVec3f & getProfileCoordinate3(int index) const
Returns the current profiles and their coordinates from the state.
SoCallbackAction()
The constructor.
SoComplexity::Type getComplexityType() const
Returns complexity information from the state.
const SbMatrix & getViewingMatrix() const
Returns the current camera and viewing information from the state.
void setCallbackAll(SbBool flag)
Sets whether the callback uses normal traversal (switches, etc.) or whether it traverses every single...
SoTexture::Wrap getTextureWrapS() const
Returns the current texture mapping information from the state.
SoShapeHints::FaceType getFaceType() const
Returns the current shape hints from the state.
SoFont::RenderStyle getFontRenderStyle() const
Returns the current font information from the state.
const SbVec3f & getLightAttenuation() const
Returns the current lighting model information from the state.
int32_t getSwitch() const
Returns the current switch value.
SoNormalBinding::Binding getNormalBinding() const
Returns the current normal information from the state.
int getLinePatternScaleFactor() const
Returns the current drawing style information from the state.
Type
These are the available decimation types.
TransparencyType
Transparency rendering algorithm.
Abstract base class for all database nodes.
Maintains a list of pointers to 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.
2D texture transformation node.
Model
Texture Combiner Functions.
Stores runtime type information.