Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoLevelOfSimplification.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-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24
25#ifndef _SO_LEVEL_OF_SIMPLIFICATION_
26#define _SO_LEVEL_OF_SIMPLIFICATION_
27
28#include <Inventor/fields/SoMFFloat.h>
29#include <Inventor/fields/SoSFInt32.h>
30#include <Inventor/nodes/SoLOD.h>
31
33//
34// Class: SoLevelOfSimplification
35//
36// Level-of-simplfication group node. The children of this node typically
37// represent the same object or objects at varying levels of detail,
38// from highest detail to lowest.
39//
40// The group node is derived from SoLOD, and adds a new field
41// "percentages", which can be used to specify how complex
42// a representation each child is. The first child is assumed
43// to be the 1.0 representation, and then each value in the
44// "percentages" field specifies what percentage reduction
45// this representation is.
46//
47// If a full model has 1000 triangles, and there are two lower
48// levels of detail: one with 500 triangles and the other with 250,
49// then the percentages field should be [0.5, 0.25]
50//
51// This node will react to the Decimation element, forcing this
52// node to choose the representation with a certain percentage
53// detail.
54// If DecimationType is LOWEST or HIGHEST, this node will choose
55// the lowest or highest child.
56//
57// If DecimationType is PERCENTAGE, and DecimationValue "D",
58// this node will choose Child "i" such that:
59// percentages[i-1] <= D < percentages[i]
60//
61// If DeciamtionType is AUTOMATIC, then the child is chosen
62// based on the range value in the usual SoLOD manner, but
63// no child greater than the value of the DecimationPercentage
64// element will be chosen.
65//
66// You should specify N percentages for N+1 children.
67//
69
141
142 SO_NODE_HEADER(SoLevelOfSimplification);
143
144 public:
145 // Fields
158
163
168
169
170 private:
171 static void initClass();
172 static void exitClass();
173
174 private:
175 // Implement actions:
176 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
177
178
179 private:
180 virtual ~SoLevelOfSimplification();
181
182 virtual int whichToTraverse(SoAction *);
183};
184
185#endif /* _SO_LEVEL_OF_SIMPLIFICATION_ */
186
Abstract base class for all actions.
Definition SoAction.h:132
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Distance-based l...
Definition SoLOD.h:141
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Level-of-detail ...
SoLevelOfSimplification()
Creates level-of-simplification node with default settings.
SoSFInt32 numTriangles
Number of triangles in highest (1.0) case.
SoMFFloat percentages
Percentage decimation for each child.
SoLevelOfSimplification(int nChildren)
Constructor that takes approximate number of children.
Multiple-value field containing any number of floating point values.
Definition SoMFFloat.h:90
Field containing a int32_t integer.
Definition SoSFInt32.h:80