51#ifndef _SO_CALLBACK_ACTION_
52#define _SO_CALLBACK_ACTION_
54#include <Inventor/SbBox.h>
55#include <Inventor/actions/SoSubAction.h>
56#include <Inventor/nodes/SoComplexity.h>
57#include <Inventor/nodes/SoDrawStyle.h>
58#include <Inventor/nodes/SoFont.h>
59#include <Inventor/nodes/SoLightModel.h>
60#include <Inventor/nodes/SoMaterialBinding.h>
61#include <Inventor/nodes/SoNormalBinding.h>
62#include <Inventor/nodes/SoPickStyle.h>
63#include <Inventor/nodes/SoShapeHints.h>
64#include <Inventor/nodes/SoTexture.h>
65#include <Inventor/nodes/SoTextureCoordinateBinding.h>
66#include <Inventor/nodes/SoUnits.h>
67#include <Inventor/elements/SoDecimationTypeElement.h>
68#include <Inventor/actions/SoGLRenderAction.h>
114typedef int SoCallbackActionCB2(
void *userData,
345#ifndef HIDDEN_FROM_DOC
518 int mtlIndex = 0)
const;
733 Response getCurrentResponse()
const {
return response; }
736 virtual void invokePreCallbacks(
const SoNode *node);
737 virtual void invokePostCallbacks(
const SoNode *node);
740 virtual void invokeTriangleCallbacks(
const SoShape *shape,
744 virtual void invokeLineSegmentCallbacks(
const SoShape *shape,
747 virtual void invokePointCallbacks(
const SoShape *shape,
751 virtual SbBool shouldGeneratePrimitives(
const SoShape *shape)
const;
758 static SbBool duringCallbackAll;
759 static void initClass();
760 static void exitClass();
763 virtual SoNode *getCurPathTail();
766 void setCurrentNode(
SoNode *node)
767 { currentNode = node;}
827 ANY=PRE|POST|PRE_TAIL|POST_TAIL,
832 template<
class T,
int N >
837 virtual void beginTraversal(
SoNode *node);
857 SbPList lineSegmentCallbackList;
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.
void SoTriangleCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3)
Typedef for callback routine used with the callbacks for generating triangles primitives.
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.
void SoLineSegmentCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2)
Typedefs for callback routine used with the callbacks for generating line segments primitives.
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.
void SoPointCB(void *userData, SoCallbackAction *action, const SoPrimitiveVertex *v)
Typedefs for callback routine used with the callbacks for generating points primitives.
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.