Open Inventor
Release 2023.2.3
Loading...
Searching...
No Matches
SoPointSet.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-2021 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_POINT_SET_
51
#define _SO_POINT_SET_
52
53
#include <
Inventor/fields/SoSFInt32.h
>
54
#include <
Inventor/nodes/SoNonIndexedShape.h
>
55
#include <
Inventor/SbPImpl.h
>
56
57
class
SoState
;
58
class
SoTextureCoordinateBundle
;
59
class
SoTextureCoordinate3Bundle
;
60
61
SO_PIMPL_PUBLIC_DECLARATION
(
SoPointSet
)
62
63
64
//
65
// Class: SoPointSet
66
//
67
// Set of points, using the current coordinates. The startIndex field
68
// gives the starting coordinate index for the first point. The number of
69
// points to draw is determined by the numPoints field.
70
//
72
73
// This value, when used in the numPoints field, means use the rest of
74
// the coordinates as points
75
#define SO_POINT_SET_USE_REST_OF_POINTS (-1)
76
162
class
SoPointSet
:
public
SoNonIndexedShape
163
{
164
SO_NODE_HEADER
(
SoPointSet
);
165
SO_PIMPL_PUBLIC_HEADER(
SoPointSet
)
166
167
public
:
171
SoSFInt32
numPoints
;
172
176
SoPointSet
();
177
178
private
:
180
virtual
void
GLRender(
SoGLRenderAction
* action );
181
186
virtual
void
getBoundingBox(
SoGetBoundingBoxAction
* action );
187
189
virtual
void
getPrimitiveCount(
SoGetPrimitiveCountAction
* action );
190
191
// Computes bounding box
192
virtual
void
computeBBox(
SoAction
* action,
SbBox3f
& box,
SbVec3f
& center );
193
194
private
:
195
197
static
void
initClass();
199
static
void
exitClass();
200
201
// return num vertices
202
virtual
int
getNumVert(
SoState
* state = NULL );
203
205
virtual
void
notify( SoNotList* list );
206
207
//return number of primitives
208
virtual
int
getNumPrim(
SoState
* state = NULL );
209
210
private
:
211
// Generates points representing point set
212
virtual
void
generatePrimitives(
SoAction
* action );
213
214
// check if normal should be generated or not.
215
virtual
void
shouldGenerateNormals(
SoGLRenderAction
* action,
const
SoShapeStyleElement
*shapeStyle );
216
217
// No tangent generation
218
virtual
void
shouldGenerateTangents(
SoGLRenderAction
*
/*action*/
,
const
SoShapeStyleElement
*
/*shapeStyle*/
) {}
219
220
// check if glrender should be called
221
virtual
SbBool
shouldGLRender(
SoGLRenderAction
* action,
SbBool
isPointsOrLines =
FALSE
);
222
223
//Free memory
224
virtual
void
exitRender(
SoState
* state,
225
int
stateFlag,
226
SoTextureCoordinateBundle
* tcb,
227
SoTextureCoordinate3Bundle
* tc3b );
228
229
// count the number of primitives in the shape
230
virtual
void
countPrim(
SoState
* state = NULL );
231
232
// really do the rendering part
233
virtual
void
doRendering(
SoGLRenderAction
* action,
const
SoShapeStyleElement
* shapeStyle );
234
235
// says that rendering is PointOrLine
236
virtual
SbBool
isRenderingPointsOrLines(
SoGLRenderAction
* action );
237
238
// Overrides standard method to create an SoPointDetail instance
239
virtual
SoDetail
* createPointDetail(
SoRayPickAction
* action,
240
const
SoPrimitiveVertex
* v,
241
SoPickedPoint
* pp);
242
244
virtual
~SoPointSet
();
245
246
};
247
248
inline
SbBool
249
SoPointSet::isRenderingPointsOrLines(
SoGLRenderAction
* )
250
{
251
return
TRUE
;
252
}
253
254
#endif
/* _SO_POINT_SET_ */
255
TRUE
#define TRUE
Possible value of SbBool.
Definition
SbBase.h:77
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)
SbBox3f
3D box class.
Definition
SbBox.h:649
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
SoGetBoundingBoxAction
Computes bounding box of a scene.
Definition
SoGetBoundingBoxAction.h:172
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
SoPointSet
Point set shape node.
Definition
SoPointSet.h:163
SoPointSet::numPoints
SoSFInt32 numPoints
Number of points.
Definition
SoPointSet.h:171
SoPointSet::SoPointSet
SoPointSet()
Creates a point set node with default settings.
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
SbBool
int SbBool
Boolean type.
Definition
SbBase.h:87
Inventor
nodes
SoPointSet.h
Generated by
1.9.8