Open Inventor
Release 2023.2.3
Loading...
Searching...
No Matches
SoTriangleStripSet.h
Go to the documentation of this file.
1
/*=======================================================================
2
* Copyright 1991-1996, Silicon Graphics, Inc.
3
* ALL RIGHTS RESERVED
4
*
5
* UNPUBLISHED -- Rights reserved under the copyright laws of the United
6
* States. Use of a copyright notice is precautionary only and does not
7
* imply publication or disclosure.
8
*
9
* U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
10
* Use, duplication or disclosure by the Government is subject to restrictions
11
* as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
12
* in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
13
* in similar or successor clauses in the FAR, or the DOD or NASA FAR
14
* Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
15
* 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
16
*
17
* THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
18
* INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
19
* DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
20
* PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
21
* GRAPHICS, INC.
22
**=======================================================================*/
23
/*=======================================================================
24
** Author : Paul S. Strauss (MMM yyyy)
25
**=======================================================================*/
26
/*=======================================================================
27
*** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
28
*** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
29
*** ***
30
*** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
31
*** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
32
*** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
33
*** ***
34
*** RESTRICTED RIGHTS LEGEND ***
35
*** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
36
*** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
37
*** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
38
*** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
39
*** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
40
*** ***
41
*** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, ***
42
*** BORDEAUX, FRANCE ***
43
*** ALL RIGHTS RESERVED ***
44
**=======================================================================*/
45
/*=======================================================================
46
** Modified by : VSG (MMM YYYY)
47
**=======================================================================*/
48
49
50
#ifndef _SO_TRIANGLE_STRIP_SET_
51
#define _SO_TRIANGLE_STRIP_SET_
52
53
#include <
Inventor/fields/SoMFInt32.h
>
54
#include <
Inventor/nodes/SoNonIndexedShape.h
>
55
#include <
Inventor/SbPImpl.h
>
56
58
//
59
// Class: SoTriangleStripSet
60
//
61
// Triangle strip set node. Each strip in the set consists of n
62
// vertices located at consecutive entries in the current
63
// coordinates. The startIndex field gives the starting coordinate
64
// index for the first strip. If materials or normals are bound to
65
// vertices, they will begin at that index, as well; otherwise, they
66
// will start at index 0. The number of vertices in each strip is
67
// determined by successive entries in the numVertices field.
68
//
70
71
class
SoCoordinateElement
;
72
class
SoVolumeTriangleStripSet
;
73
74
SO_PIMPL_PUBLIC_DECLARATION
(
SoTriangleStripSet
)
75
76
// Deprecated feature; specifying USE_REST_OF_VERTICES as the last
77
// value in the numVertices field will use all the points in the
78
// coordinate array.
79
#define SO_TRI_STRIP_SET_USE_REST_OF_VERTICES (-1)
80
165
class
SoTriangleStripSet
:
public
SoNonIndexedShape
166
{
167
SO_NODE_HEADER
(
SoTriangleStripSet
);
168
SO_PIMPL_PUBLIC_HEADER(
SoTriangleStripSet
)
169
170
public
:
171
// Fields
176
SoMFInt32
numVertices
;
177
181
SoTriangleStripSet
();
182
183
private
:
187
virtual
void
GLRender(
SoGLRenderAction
* action );
188
193
virtual
void
generateDefaultNormals(
SoState
* state,
194
const
SbVec3f
* coords,
195
int
numCoords,
196
SoNormalBundle* nb,
197
SbBool
storeRef =
FALSE
);
198
200
virtual
void
shouldGenerateTangents(
SoGLRenderAction
*
/*action*/
,
const
SoShapeStyleElement
*
/*shapeStyle*/
) {}
201
205
virtual
void
getPrimitiveCount(
SoGetPrimitiveCountAction
* action );
206
207
private
:
208
// returns the number of PARTS
209
int
getNumStrips()
const
;
210
211
static
void
initClass();
212
static
void
exitClass();
213
214
//Typedef of pointer to method on TriangleStripSet;
215
//This will be used to simplify declaration and initialization.
216
typedef
void (
SoTriangleStripSet
::*PMTSS)(
SoGLRenderAction
*);
217
218
// return num vertices for test
219
virtual
int
getNumVert(
SoState
* state = NULL );
220
221
//return number of primitives
222
virtual
int
getNumPrim(
SoState
* state = NULL );
223
224
private
:
225
226
// Generates triangles representing strips
227
virtual
void
generatePrimitives(
SoAction
* action );
228
229
//Free memory
230
virtual
void
exitRender(
SoState
* state,
231
int
stateFlag,
232
SoTextureCoordinateBundle
* tcb,
233
SoTextureCoordinate3Bundle
* tc3b);
234
235
// count primitives
236
virtual
void
countPrim(
SoState
* state = NULL );
237
238
// render function
239
void
doRendering(
SoGLRenderAction
* action,
const
SoShapeStyleElement
* shapeStyle);
240
241
// Overrides standard method to create an SoFaceDetail instance
242
virtual
SoDetail
* createTriangleDetail(
SoRayPickAction
* action,
243
const
SoPrimitiveVertex
* v1,
244
const
SoPrimitiveVertex
* v2,
245
const
SoPrimitiveVertex
* v3,
246
SoPickedPoint
* pp);
247
248
virtual
~SoTriangleStripSet
();
249
250
private
:
251
// Blow vpCache when vertexProperty field changes:
252
virtual
void
notify( SoNotList* list );
253
254
private
:
255
256
static
const
int
AUTO_CACHE_TSS_MIN_WITHOUT_VP;
257
static
const
int
AUTO_CACHE_TSS_MAX;
258
};
259
260
#endif
/* _SO_TRIANGLE_STRIP_SET_ */
261
262
FALSE
#define FALSE
Possible value of SbBool.
Definition
SbBase.h:75
SbPImpl.h
SO_PIMPL_PUBLIC_DECLARATION
SO_PIMPL_PUBLIC_DECLARATION(SoFileDataAdapter)
SoMFInt32.h
SoNonIndexedShape.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
SoCoordinateElement
Stores the current coordinates.
Definition
SoCoordinateElement.h:75
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
SoMFInt32
Multiple-value field containing any number of int32_t integers.
Definition
SoMFInt32.h:88
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
SoShapeStyleElement
Stores some information used by shapes.
Definition
SoShapeStyleElement.h:83
SoState
Traversal state.
Definition
SoState.h:74
SoTriangleStripSet
Triangle strip set shape node.
Definition
SoTriangleStripSet.h:166
SoTriangleStripSet::numVertices
SoMFInt32 numVertices
Number of vertices in each triangle strip.
Definition
SoTriangleStripSet.h:176
SoTriangleStripSet::SoTriangleStripSet
SoTriangleStripSet()
Creates a triangle strip set node with default settings.
SoVolumeTriangleStripSet
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Triangle strip set sh...
Definition
SoVolumeTriangleStripSet.h:169
SbBool
int SbBool
Boolean type.
Definition
SbBase.h:87
Inventor
nodes
SoTriangleStripSet.h
Generated by
1.9.8