Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoBevelPropertyElement.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#ifndef _SO_BEVEL_PROPERTY_ELEMENT
24#define _SO_BEVEL_PROPERTY_ELEMENT
25
26#include <Inventor/fields/SoMFInt32.h>
27#include <Inventor/elements/SoReplacedElement.h>
28#include <Inventor/nodes/SoBevelProperty.h>
29
40SoEXTENDER_Documented class SoBevelPropertyElement : public SoReplacedElement {
41
42 SO_ELEMENT_HEADER(SoBevelPropertyElement);
43
44 public:
45
50 static void setAngle(SoState *state, SoNode *node, float);
55 static void setRadius(SoState *state, SoNode *node, float = SoBevelProperty::DEFAULT_RADIUS);
59 static void setAbsoluteRadius(SoState *state, SoNode *node, float);
60
65 static void setTests(SoState *state, SoNode *node, int);
66
71 {return getConstElement<SoBevelPropertyElement>(state);}
72
76 float getAngle() const {return angle;}
80 float getRadius() const {return radius;}
84 SbBool isAbsoluteRadius() const {return absoluteRadius;}
88 SbBool isEnabled() const {return propertyEnabled;}
108 int getTestsToDoBeforeBevel() const {return tests;}
109
113 virtual void print(FILE *fp) const;
114
115private:
116
118 virtual void init(SoState *state);
119
120 private:
121 // Initializes the SoBevelPropertyElement class
122 static void initClass();
123 static void exitClass();
124
125 private:
126 float angle, radius;
127 SbBool absoluteRadius, propertyEnabled;
128 int tests;
129
130 virtual ~SoBevelPropertyElement();
131};
132
133#endif /* _SO_BEVEL_PROPERTY_ELEMENT */
134
135
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Stores various b...
virtual void print(FILE *fp) const
Prints element (for debugging).
static void setRadius(SoState *state, SoNode *node, float=SoBevelProperty::DEFAULT_RADIUS)
Sets the bevel radius as a percentage [0.0, 1.0] of the greater value of the length of each edge.
static void setAngle(SoState *state, SoNode *node, float)
Sets the bevel angle: if 2 adjacent faces make a greater angle, then their common edge is beveled.
float getAngle() const
Gets the bevel properties (angle).
SbBool isEnabled() const
Gets the bevel properties (enabled flag).
SbBool isAbsoluteRadius() const
Gets the bevel properties (absolute radius).
float getRadius() const
Gets the bevel properties (radius).
static const SoBevelPropertyElement * getInstance(SoState *state)
Returns the top (current) instance of the element in the state.
int getTestsToDoBeforeBevel() const
Method to know the different tests currently selected; these tests will be performed on each shape be...
SbBool isDuplicateTestEnabled() const
Method to know if this test is enabled.
SbBool isCoplanarTestEnabled() const
Method to know if this test is enabled.
static void setTests(SoState *state, SoNode *node, int)
Allows the user to switch on/off the tests applied before the bevel (can increase speed when the test...
SbBool isOrderingTestEnabled() const
Method to know if this test is enabled.
static void setAbsoluteRadius(SoState *state, SoNode *node, float)
Sets the bevel radius as an absolute value.
@ DUPLICATE_TEST
Remove duplicate faces.
@ COPLANAR_TEST
Concatenate coplanar faces.
@ ORDERING_TEST
Reorder facet normals.
Abstract base class for all database nodes.
Definition SoNode.h:145
Abstract base class for each state element whose value is replaced whenever it is set.
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87