Open Inventor
Release 2023.2.3
Loading...
Searching...
No Matches
SoTriangleSet.h
Go to the documentation of this file.
1
/*=======================================================================
2
*** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3
*** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4
*** ***
5
*** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6
*** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7
*** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8
*** ***
9
*** RESTRICTED RIGHTS LEGEND ***
10
*** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11
*** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12
*** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13
*** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14
*** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15
*** ***
16
*** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, ***
17
*** BORDEAUX, FRANCE ***
18
*** ALL RIGHTS RESERVED ***
19
**=======================================================================*/
20
/*=======================================================================
21
** Author : David Beilloin (Mar 2011)
22
** Modified by : VSG (MMM YYYY)
23
**=======================================================================*/
24
25
#ifndef _SO_TRIANGLE_SET_
26
#define _SO_TRIANGLE_SET_
27
28
#include <
Inventor/fields/SoSFInt32.h
>
29
#include <
Inventor/nodes/SoNonIndexedShape.h
>
30
#include <
Inventor/SbPImpl.h
>
31
32
// This value, when used in the numTriangles field, means that the
33
// corresponding set should use the rest of the vertices
34
#define SO_TRIANGLE_SET_USE_REST_OF_VERTICES (-1)
35
36
class
SoNormalBundle;
37
class
SoState
;
38
39
SO_PIMPL_PUBLIC_DECLARATION
(
SoTriangleSet
)
40
41
//@TOBEWRAPPED
122
class
SoTriangleSet
: public
SoNonIndexedShape
123
{
124
SO_NODE_HEADER
(
SoTriangleSet
);
125
SO_PIMPL_PUBLIC_HEADER(
SoTriangleSet
)
126
127
public
:
128
134
SoSFInt32
numTriangles
;
135
139
SoTriangleSet
();
140
141
private
:
142
// Implement actions
143
145
virtual
void
GLRender(
SoGLRenderAction
* action );
146
148
virtual
void
getPrimitiveCount(
SoGetPrimitiveCountAction
* action );
149
151
virtual
void
generateDefaultNormals(
SoState
* state,
152
const
SbVec3f
* coords,
153
int
numCoords,
154
SoNormalBundle* nb,
155
SbBool
storeRef =
FALSE
);
156
158
virtual
void
shouldGenerateTangents(
SoGLRenderAction
*
/*action*/
,
const
SoShapeStyleElement
*
/*shapeStyle*/
) {}
159
160
private
:
161
163
static
void
initClass();
164
166
static
void
exitClass();
167
168
virtual
int
getNumVert(
SoState
* state = NULL );
169
170
virtual
int
getNumPrim(
SoState
* state = NULL );
171
172
private
:
173
174
// This enum is used to indicate the current material or normal binding
175
enum
Binding {
176
OVERALL,
177
PER_FACE,
178
PER_VERTEX
179
};
180
181
//Free memory
182
virtual
void
exitRender(
SoState
* state,
183
int
stateFlag,
184
SoTextureCoordinateBundle
* tcb,
185
SoTextureCoordinate3Bundle
* tc3b);
186
187
virtual
void
countPrim(
SoState
* state = NULL );
188
189
// Generates triangles representing faces
190
virtual
void
generatePrimitives(
SoAction
* action );
191
192
// render function
193
void
doRendering(
SoGLRenderAction
* action,
const
SoShapeStyleElement
* shapeStyle );
194
195
// Overrides standard method to create an SoFaceDetail instance
196
virtual
SoDetail
* createTriangleDetail(
SoRayPickAction
* action,
197
const
SoPrimitiveVertex
* v1,
198
const
SoPrimitiveVertex
* v2,
199
const
SoPrimitiveVertex
* v3,
200
SoPickedPoint
* pp);
201
203
~SoTriangleSet
();
204
205
private
:
206
207
// reset numTris to -1, to rechecks SO_USE_REST_OF_VERTICES usage when notified
208
virtual
void
notify
( SoNotList* list );
209
210
private
:
211
212
friend
class
SoVolumeTriangleSetDl;
213
};
214
215
#endif
/* _SO_TRIANGLE_SET_ */
216
FALSE
#define FALSE
Possible value of SbBool.
Definition
SbBase.h:75
SbPImpl.h
SO_PIMPL_PUBLIC_DECLARATION
SO_PIMPL_PUBLIC_DECLARATION(SoFileDataAdapter)
SoNonIndexedShape.h
SoSFInt32.h
SO_NODE_HEADER
#define SO_NODE_HEADER(className)
Definition
SoSubNode.h:151
SoTextureCoordinate3Bundle
SoTextureCoordinate3Bundle(SoAction *action, SbBool forRendering, SbBool setUpDefault, SbBool forMesh)
SoTextureCoordinateBundle
SoTextureCoordinateBundle(SoAction *action, SbBool forRendering, SbBool setUpDefault, SbBool forMesh, const SbIntList *texUnits=NULL)
SbVec3f
3D vector class.
Definition
SbVec.h:932
SoAction
Abstract base class for all actions.
Definition
SoAction.h:132
SoDetail
Base class for describing detail information about a shape node.
Definition
SoDetail.h:99
SoGLRenderAction
Renders a scene graph using Open Inventor's Render Engine.
Definition
SoGLRenderAction.h:189
SoGetPrimitiveCountAction
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Definition
SoGetPrimitiveCountAction.h:116
SoNonIndexedShape
Abstract base class for all non-indexed vertex-based shapes.
Definition
SoNonIndexedShape.h:112
SoPickedPoint
Represents point on surface of picked object.
Definition
SoPickedPoint.h:103
SoPrimitiveVertex
Represents a vertex of a generated primitive.
Definition
SoPrimitiveVertex.h:98
SoRayPickAction
Intersects objects with a ray cast into scene.
Definition
SoRayPickAction.h:349
SoSFInt32
Field containing a int32_t integer.
Definition
SoSFInt32.h:80
SoShapeStyleElement
Stores some information used by shapes.
Definition
SoShapeStyleElement.h:83
SoState
Traversal state.
Definition
SoState.h:74
SoTriangleSet
Set of triangles shape node.
Definition
SoTriangleSet.h:123
SoTriangleSet::SoTriangleSet
SoTriangleSet()
Creates a triangle set node with default settings.
SoTriangleSet::numTriangles
SoSFInt32 numTriangles
Number of triangles in the set.
Definition
SoTriangleSet.h:134
SbBool
int SbBool
Boolean type.
Definition
SbBase.h:87
notify
void notify(SoNotList *list)
Inventor
nodes
SoTriangleSet.h
Generated by
1.9.8