Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoPolygonOffset.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-2024 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : R. ALBOU (Nov 1998)
22**=======================================================================*/
23
24 /* include files */
25#ifndef _SO_POLYGON_OFFSET_
26#define _SO_POLYGON_OFFSET_
27
28#include <Inventor/fields/SoSFFloat.h>
29#include <Inventor/fields/SoSFBitMask.h>
30#include <Inventor/fields/SoSFBool.h>
31
32#include <Inventor/nodes/SoNode.h>
33
34#include <Inventor/elements/SoPolygonOffsetElement.h>
35
36class SoGLRenderAction ;
37class SoCallbackAction ;
38
39/*----------------------------------------------------------------------------*/
40
100class SoPolygonOffset : public SoNode {
101 SO_NODE_HEADER(SoPolygonOffset) ;
102
103
104 public:
105
115
116 // Fields
123
130
136
141
146
151 inline virtual void setOverride(const SbBool state)
152 { override.setValue(state); }
153
157 inline virtual SbBool isOverride() const
158 { return override.getValue(); }
159
160 private:
161 virtual void doAction(SoAction *action);
162 virtual void callback(SoCallbackAction *action) ;
163 virtual void GLRender(SoGLRenderAction *action) ;
164
165
166 /*----------------------------------------------------------------------------*/
167
168 private:
169 static void initClass() ;
170 static void exitClass() ;
171
172 SoSFBool override;
173
174 private:
175 // Destructor
176 virtual ~SoPolygonOffset() ;
177} ;
178/*----------------------------------------------------------------------------*/
179
180#endif /* _SO_POLYGON_OFFSET_ */
181
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
Renders a scene graph using Open Inventor's Render Engine.
Abstract base class for all database nodes.
Definition SoNode.h:145
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Property node th...
SoSFBitMask styles
A bit-wise combination of FILLED, LINES, and POINTS that determines which polygon modes should be off...
SoSFBool on
Enables/disables polygon offset.
virtual void setOverride(const SbBool state)
Set the state of the override field.
Style
Offset style.
SoSFFloat factor
Specifies a scale factor that is used to create a variable depth offset for each polygon.
SoSFFloat units
Is multiplied by an OpenGL implementation-specific value to create a constant depth offset.
virtual SbBool isOverride() const
Returns the state of the override field.
SoPolygonOffset()
Constructor.
Single-value field containing a set of bit flags.
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing a floating-point value.
Definition SoSFFloat.h:78
int SbBool
Boolean type.
Definition SbBase.h:87