Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoIndexedShape.h
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_INDEXED_SHAPE_
51#define _SO_INDEXED_SHAPE_
52
53#include <Inventor/fields/SoMFInt32.h>
54#include <Inventor/nodes/SoVertexShape.h>
55#include <Inventor/SbPImpl.h>
56
57class SbVec2d;
58
59SO_PIMPL_PUBLIC_DECLARATION(SoIndexedShape)
60
61
62//
63// Class: SoIndexedShape
64//
65// Abstract indexed shape node class. All nodes derived from this
66// (such as SoIndexedFaceSet and SoIndexedLineSet) are shapes
67// that are constructed from vertices defined by indexing into the
68// current coordinates. The coordinate indices are stored in the
69// coordIndex field, which is used by all subclasses.
70//
71// One rule is used: all coordinate indices less than 0 may be used
72// for special purposes, such as to denote the end of a face or
73// polyline. This means that all indices < 0 can be ignored safely
74// when looking at vertices.
75//
76// Depending on the current material, normal, tangent and texture coordinate
77// binding values, materials, normals, tangents and texture coordinates may be
78// accessed in order or may be indexed using the materialIndex,
79// normalIndex, tangentIndex and textureCoordIndex fields.
80//
82
161{
162 SO_NODE_ABSTRACT_HEADER(SoIndexedShape);
163 SO_PIMPL_PUBLIC_HEADER(SoIndexedShape)
164
165public:
201
202private:
211 virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center);
212
221 virtual void computeBBox(SoAction *action, SbXfBox3d &box, SbVec3d &center);
222
226 virtual void rayPick(SoRayPickAction *action);
227
228private:
229
230 static void initClass();
231 static void exitClass();
232
233 // Keep indices up to date if things change
234 virtual void notify(SoNotList *list);
235
236private:
239
241 virtual ~SoIndexedShape();
242
243private:
244
245 static bool s_evaluateIndexingGainFactor;
246
247 void commonConstructor();
248
249};
250
251#endif /* _SO_INDEXED_SHAPE_ */
3D box class.
Definition SbBox.h:649
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 2D vector class ...
Definition SbVec.h:314
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D vector class ...
Definition SbVec.h:1214
3D vector class.
Definition SbVec.h:932
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D box with an a...
Definition SbBox.h:1513
Abstract base class for all actions.
Definition SoAction.h:132
Abstract base class for all indexed vertex-based shapes.
SoMFInt32 normalIndex
The indices of the normals that are used for the shape.
SoMFInt32 coordIndex
The indices of the coordinates that the shape uses as its vertices.
SoMFInt32 textureCoordIndex
The indices of the texture coordinates that are used for the shape.
SoMFInt32 materialIndex
The indices of the materials that are used for the shape.
SoMFInt32 tangentIndex
The indices of the tangents that are used for the shape.
Multiple-value field containing any number of int32_t integers.
Definition SoMFInt32.h:88
Intersects objects with a ray cast into scene.
Abstract base class for all vertex-based shape nodes.