Open Inventor Release 2024.1.0
 
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
55#include <Inventor/SbPImpl.h>
56
57class SoState;
60
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
163{
165 SO_PIMPL_PUBLIC_HEADER(SoPointSet)
166
167public:
172
177
178private:
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
194private:
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
210private:
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,
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
248inline SbBool
249SoPointSet::isRenderingPointsOrLines( SoGLRenderAction * )
250{
251 return TRUE;
252}
253
254#endif /* _SO_POINT_SET_ */
255
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75
SO_PIMPL_PUBLIC_DECLARATION(SoBMPImageRW)
#define SO_NODE_HEADER(className)
Definition SoSubNode.h:151
SoTextureCoordinate3Bundle(SoAction *action, SbBool forRendering, SbBool setUpDefault, SbBool forMesh)
SoTextureCoordinateBundle(SoAction *action, SbBool forRendering, SbBool setUpDefault, SbBool forMesh, const SbIntList *texUnits=NULL)
3D box class.
Definition SbBox.h:649
3D vector class.
Definition SbVec.h:932
Abstract base class for all actions.
Definition SoAction.h:132
Base class for describing detail information about a shape node.
Definition SoDetail.h:99
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Abstract base class for all non-indexed vertex-based shapes.
Represents point on surface of picked object.
Point set shape node.
Definition SoPointSet.h:163
SoSFInt32 numPoints
Number of points.
Definition SoPointSet.h:171
SoPointSet()
Creates a point set node with default settings.
Represents a vertex of a generated primitive.
Intersects objects with a ray cast into scene.
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Stores some information used by shapes.
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87