Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoExtrusion.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-2017 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _SO_EXTRUSION_
25#define _SO_EXTRUSION_
26
27#include <Inventor/fields/SoSFFloat.h>
28#include <Inventor/fields/SoSFBool.h>
29#include <Inventor/fields/SoMFVec2f.h>
30#include <Inventor/fields/SoMFRotation.h>
31#include <Inventor/fields/SoMFVec3f.h>
32
33#include <Inventor/nodes/SoBaseExtrusion.h>
34#include <Inventor/STL/memory>
35#include <Inventor/SbPImpl.h>
36
37class SoNormalBundle;
38class SoState;
39
40SO_PIMPL_PUBLIC_DECLARATION(SoExtrusion)
41
42
43//
44// Class: SoExtrusion
45//
46// Node that defines the extrusion parameters
47//
49
231{
232 SO_NODE_HEADER(SoExtrusion);
233 SO_PIMPL_PUBLIC_HEADER(SoExtrusion)
234
235 public:
236 // Fields
237
238
245
254
262
267
268
269 private:
270 // Implements actions
271
273 virtual void doAction( SoAction *action );
274
276 virtual void callback( SoCallbackAction *action );
277
279 virtual void rayPick( SoRayPickAction *action );
280
282 virtual void getPrimitiveCount( SoGetPrimitiveCountAction *action );
283
285 virtual void computeBBox( SoAction *action, SbBox3f &box, SbVec3f &center );
286
288 virtual void computeBBox( SoAction *action, SbXfBox3d &box, SbVec3d &center );
289
290 private:
291
293 virtual void notify( SoNotList *list );
294
296 static void initClass();
297
299 static void exitClass();
300
302 void flagModified();
303
305 void setMaterialIndices(const std::vector<int>& useColorIndices, bool addFirst, bool addLast);
306
307 private:
308
310 virtual void generatePrimitives( SoAction *action );
311
313 virtual ~SoExtrusion();
314
315 private:
316
317 // Generates default normals for the generated extrusion.
318 SbBool generateDefaultNormals( SoState *state, int numcols,
319 int numrows, SbVec3f *verts,
320 SoNormalBundle *nb );
321
322 void commonConstructor();
323};
324
325#endif /* _SO_EXTRUSION_ */
326
3D box class.
Definition SbBox.h:649
<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 extrusion-based shape nodes.
Performs a generic traversal of a scene graph or path.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Geometric shape ...
SoExtrusion()
Constructor.
SoMFRotation orientation
The cross-section curve is rotated by this value relative to a local reference system with origin at ...
SoMFVec2f scale
The cross-section curve is scaled by this value on the X and Z axes.
SoMFVec2f crossSection
The shape that will be extruded, defined by a 2D piecewise linear curve in the XZ plane (described as...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Multiple-value field containing any number of SbRotations.
Multiple-value field containing any number of two-dimensional vectors.
Definition SoMFVec2f.h:89
Intersects objects with a ray cast into scene.
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87