Debian Codegraph @

doc/man/man3/ivm/actions/SoCallbackAction.ivm

raw
1 NAME SoCallbackAction SoCBAct "" {
2 performs a generic traversal of the scene graph
3 }
4
5 INCLUDE actions/SoCallbackAction.h
6
7 DESC {
8
9 This action defines a generic traversal of the scene graph. The user
10 can specify callback functions for node types or paths; when those
11 node types or paths are encountered during traversal, the user's
12 callback function is called.
13 \p
14 In addition, callback functions can be registered for primitives
15 generated by shapes in the scene graph. Most shape types can generate
16 primitives that represent or approximate their geometries.
17 \eTriangle\. primitives are used for all surfaces (such as cubes, face
18 sets, or 3D text), \eline segment\. primitives are used for line
19 shapes, and \epoint\. primitives are used for point shapes. Note that
20 the type of primitives generated for a shape is the same, regardless
21 of drawing style or other properties.
22 \p
23 Most of the \+methods\.\-functions\. on this class access information
24 from the traversal state. They should be called only by callback
25 functions that are invoked during traversal, so there is a valid state
26 to work with.
27 }
28
29 TYPEDEF void SoTriangleCB "(void *userData,
30 SoCallbackAction *action,
31 const SoPrimitiveVertex *v1,
32 const SoPrimitiveVertex *v2,
33 const SoPrimitiveVertex *v3)"
34
35 TYPEDEF void SoLineSegmentCB "(void *userData,
36 SoCallbackAction *action,
37 const SoPrimitiveVertex *v1,
38 const SoPrimitiveVertex *v2)"
39
40 TYPEDEF void SoPointCB "(void *userData,
41 SoCallbackAction *action,
42 const SoPrimitiveVertex *v)"
43
44 ENUM Response {
45 CONTINUE "Continue traversal as if nothing happened",
46 ABORT "Abort traversal",
47 PRUNE "Do not traverse node's children, but continue traversal"
48 }
49
50 TYPEDEF SoCallbackAction::Response SoCallbackActionCB "(void *userData,
51 SoCallbackAction *action,
52 const SoNode *node)"
53
54 METHOD "" SoCallbackAction() {
55 The constructor.
56 }
57
58
59 METHOD addPreCB void
60 addPreCallback(SoType type, SoCallbackActionCB *cb, void *data) {}
61 METHOD addPostCB void
62 addPostCallback(SoType type, SoCallbackActionCB *cb, void *data) {
63 These add a callback function to call when a node of the given type is
64 encountered during traversal. The PreCallback is called just before
65 the node is traversed, and the PostCallback is called just after. The
66 value returned by a callback function indicates whether the action
67 should continue with the traversal.
68 }
69
70 METHOD addPreTailCB void
71 addPreTailCallback(SoCallbackActionCB *cb, void *data) {}
72 METHOD addPostTailCB void
73 addPostTailCallback(SoCallbackActionCB *cb, void *data) {
74 These can be used to set up callback functions to call when the action
75 is applied to a path. The functions are called just before or after
76 the node at the tail of the path is traversed.
77 }
78
79 METHOD addTriCB void
80 addTriangleCallback(SoType type, SoTriangleCB *cb, void *data) {}
81 METHOD addLineSegCB void
82 addLineSegmentCallback(SoType type, SoLineSegmentCB *cb, void *data) {}
83 METHOD addPntCB void
84 addPointCallback(SoType type, SoPointCB *cb, void *data) {
85 Routines to add callbacks for generated primitives (triangles, line
86 segments, and points) for all shapes of the given type. The callback
87 function will be called for each primitive generated for all shapes of
88 or derived from that type.
89 }
90
91 METHOD getCmplx float getComplexity() const {}
92 METHOD getCmplxType SoComplexity::Type getComplexityType() const {
93 Returns complexity information from the state.
94 }
95
96 METHOD getNumCoord int32_t getNumCoordinates() const {}
97 METHOD getCoord3 const SbVec3f & getCoordinate3(int index) const {}
98 METHOD getCoord4 const SbVec4f & getCoordinate4(int index) const {
99 Returns the current coordinates from the state.
100 }
101
102 METHOD "" SoDrawStyle::Style getDrawStyle() const {}
103 METHOD "" unsigned short getLinePattern() const {}
104 METHOD "" float getLineWidth() const {}
105 METHOD "" float getPointSize() const {
106 Returns the current drawing style information from the state.
107 }
108
109 METHOD "" const SbName & getFontName() const {}
110 METHOD "" float getFontSize() const {
111 Returns the current font information from the state.
112 }
113
114 METHOD getLModel SoLightModel::Model getLightModel() const {}
115 METHOD getLtAtten const SbVec3f & getLightAttenuation() const {
116 Returns the current lighting model information from the state.
117 }
118
119 METHOD getMtl void getMaterial(
120 SbColor &ambient,
121 SbColor &diffuse,
122 SbColor &specular,
123 SbColor &emission,
124 float &shininess,
125 float &transparency,
126 int mtlIndex = 0) const {}
127 METHOD getMtlBind SoMaterialBinding::Binding getMaterialBinding() const {
128 Returns the current material information from the state. Providing a
129 \amtlIndex\. will return the material defined for that index.
130 }
131
132 METHOD getNumNorms long getNumNormals() const {}
133 METHOD getNorms const SbVec3f & getNormal(int index) const {}
134 METHOD getNormBind SoNormalBinding::Binding getNormalBinding() const {
135 Returns the current normal information from the state.
136 }
137
138 METHOD getNumProfCoord int32_t getNumProfileCoordinates() const {}
139 METHOD getProfCoord2 const SbVec2f & getProfileCoordinate2(int index) const {}
140 METHOD getProfCoord3 const SbVec3f & getProfileCoordinate3(int index) const {}
141 METHOD getProf const SoNodeList & getProfile() const {
142 Returns the current profiles and their coordinates from the state.
143 }
144
145 METHOD getVertOrder SoShapeHints::VertexOrdering getVertexOrdering() const {}
146 METHOD "" SoShapeHints::ShapeType getShapeType() const {}
147 METHOD "" SoShapeHints::FaceType getFaceType() const {}
148 METHOD "" float getCreaseAngle() const {
149 Returns the current shape hints from the state.
150 }
151
152 METHOD getNumTexCoord int32_t getNumTextureCoordinates() const {}
153 METHOD getTexCoord2 const SbVec2f & getTextureCoordinate2(int index) const {}
154 METHOD getTexCoord4 const SbVec4f & getTextureCoordinate4(int index) const {}
155 METHOD getTexCoordBind SoTextureCoordinateBinding::Binding
156 getTextureCoordinateBinding() const {}
157 METHOD getTexBlendCol const SbColor & getTextureBlendColor() const {}
158 METHOD getTexImage const unsigned char *
159 getTextureImage(SbVec2s &size, int &numComps) const {
160 Returns texture information from the state.
161 \m\+getNumTextureCoordinates()\.\.
162 \m\-SoCBActGetNumTexCoord()\.\.
163 returns 0 if texture coordinates are generated by a function.
164 \m\+getTextureImage()\.\.
165 \m\-SoCBActGetTexImage()\.\.
166 returns NULL if no texture is enabled.
167 }
168
169 METHOD getTexMx const SbMatrix & getTextureMatrix() const {}
170 METHOD getTexModel SoTexture2::Model getTextureModel() const {}
171 METHOD getTexWrapS SoTexture2::Wrap getTextureWrapS() const {}
172 METHOD getTexWrapT SoTexture2::Wrap getTextureWrapT() const {
173 Returns the current texture mapping information from the state.
174 }
175
176 METHOD getModelMx const SbMatrix & getModelMatrix() const {}
177 METHOD "" SoUnits::Units getUnits() const {
178
179 Returns the current modeling transformation and the current units from
180 the state.
181 }
182
183 METHOD getFocDist float getFocalDistance() const {}
184 METHOD getProjMx const SbMatrix & getProjectionMatrix() const {}
185 METHOD getViewMx const SbMatrix & getViewingMatrix() const {}
186 METHOD getViewVol const SbViewVolume & getViewVolume() const {
187 Returns the current camera and viewing information from the state.
188 }
189
190 METHOD "" SoPickStyle::Style getPickStyle() const {
191 Returns the current picking style.
192 }
193
194 METHOD "" int32_t getSwitch() const {
195 Returns the current switch value.
196 }
197
198 ALSO {
199 SoCallback, SoEventCallback, SoShape
200 }