Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoIndexedPointSet.h
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-2021 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : F. DELLA MAESTRA (Sep 2005)
22**=======================================================================*/
23
24#ifndef _SO_INDEXED_POINT_SET_
25#define _SO_INDEXED_POINT_SET_
26
27#include <Inventor/nodes/SoIndexedShape.h>
28#include <Inventor/SbPImpl.h>
29
30SO_PIMPL_PUBLIC_DECLARATION(SoIndexedPointSet)
31
32
33//
34// Class: SoIndexedPointSet
35//
36// Indexed set of points. Each point consists of one
37// vertex, which is denoted by an integer index (from the
38// coordIndex field) into the current coordinate. Depending on the
39// current material and normal binding values, the materials and
40// normals for the vertices may be accessed in order or
41// indexed. If they are indexed, the materialIndex and normalIndex
42// fields are used. /*Texture coordinates may also be indexed, using
43// the textureCoordIndex field.*/
44//
46//#define SO_END_POINT_INDEX (-1)
47
48
138{
139 SO_NODE_HEADER(SoIndexedPointSet);
140 SO_PIMPL_PUBLIC_HEADER(SoIndexedPointSet)
141
142public:
143 // Inherits all fields
144
149
150private:
151
153 virtual void GLRender( SoGLRenderAction* action );
154
159 virtual void getBoundingBox( SoGetBoundingBoxAction* action );
160
162 virtual void getPrimitiveCount( SoGetPrimitiveCountAction* action );
163
164 // Computes bounding box
165 virtual void computeBBox( SoAction* action, SbBox3f& box, SbVec3f& center );
166
167private:
168
170 static void initClass();
171
173 static void exitClass();
174
175 // return num points for test
176 virtual int getNumPrim( SoState* state = NULL );
177
178private:
179
180 // Generates points representing point set
181 virtual void generatePrimitives( SoAction* action );
182
183 // really do the rendering part
184 virtual void doRendering( SoGLRenderAction* action, const SoShapeStyleElement* shapeStyle );
185
186 virtual void callSetupIndices( SoState* state, const SoShapeStyleElement* shapeStyle, uint32_t useTexCoordsAnyway );
187
188 // No normal generation
189 virtual void shouldGenerateNormals( SoGLRenderAction* action, const SoShapeStyleElement* shapeStyle );
190
191 // No tangent generation
192 virtual void shouldGenerateTangents( SoGLRenderAction* /*action*/, const SoShapeStyleElement* /*shapeStyle*/ ) {}
193
194 // check if glrender should be called
195 virtual SbBool shouldGLRender( SoGLRenderAction* action, SbBool isPointsOrLines = FALSE );
196
197 // says that rendering is PointOrLine
198 virtual SbBool isRenderingPointsOrLines( SoGLRenderAction* action );
199
200 // Overrides standard method to create an SoPointDetail instance
201 virtual SoDetail* createPointDetail( SoRayPickAction* action,
202 const SoPrimitiveVertex* v,
203 SoPickedPoint* pp);
204
206 virtual ~SoIndexedPointSet();
207};
208
209inline SbBool
210SoIndexedPointSet::isRenderingPointsOrLines( SoGLRenderAction* )
211{
212 return TRUE;
213}
214
215#endif /* _SO_INDEXED_POINT_SET_ */
216
217
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...
Indexed point set shape node.
SoIndexedPointSet()
Creates an indexed point set node with default settings.
Abstract base class for all indexed vertex-based shapes.
Represents point on surface of picked object.
Represents a vertex of a generated primitive.
Intersects objects with a ray cast into scene.
Stores some information used by shapes.
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87