Open Inventor Release 2025.2.0
 
Loading...
Searching...
No Matches
SoFullSceneAntialiasingElement.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-2025 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Nicolas Daguise (Nov 2003)
22**=======================================================================*/
23
24#ifndef _SO_FULL_SCENE_ANTIALIASING_ELEMENT_
25#define _SO_FULL_SCENE_ANTIALIASING_ELEMENT_
26
27#include <Inventor/elements/SoSubElement.h>
38
39SoEXTENDER_Documented class SoFullSceneAntialiasingElement : public SoElement {
40
41 SO_ELEMENT_HEADER(SoFullSceneAntialiasingElement);
42
43 public:
45 enum Filter {
47 POINTS = 0x01,
49 LINES = 0x02,
51 POLYGONS = 0x04,
53 TEXT = 0x08,
56 };
57
61 static void set(SoState *state, SbBool on, SbBool currOn, int filter);
62
68 static void setSampleCount(SoState *state, uint8_t sampleCount);
69
73 static SbBool get(SoState *state, SbBool &on, SbBool &pointsOn, SbBool &linesOn, SbBool &polygonsOn, SbBool &textsOn, int& filter);
74
78 virtual void push(SoState *state);
79
85 static SoFullSceneAntialiasingElement * getInstance(const SoState *state);
86
90 static SbBool getDefault(SbBool &on, SbBool &pointsOn, SbBool &linesOn, SbBool &polygonsOn, SbBool &textsOn, int& filter, uint8_t& sampleCount);
91
95 static SbBool getDefault(SbBool &on, SbBool &pointsOn, SbBool &linesOn, SbBool &polygonsOn, SbBool &textsOn, int& filter);
96
97private:
98
100 virtual void init(SoState *state);
101
105 virtual SbBool matches(const SoElement* elt) const;
106
110 virtual SoElement* copyMatchInfo() const;
111
112 private:
113 // Initializes the SoFullSceneAntialiasingElement class
114 static void initClass();
115 static void exitClass();
116
117 private:
118 SbBool m_on;
119 uint8_t m_sampleCount;
120 int m_filterMask;
121 SbBool m_pointsOn;
122 SbBool m_linesOn;
123 SbBool m_polygonsOn;
124 SbBool m_textOn;
125
126 virtual void setElt(SbBool on, SbBool currOn, int filter);
127
128 virtual void setElt(uint8_t sampleCount);
129
130 virtual ~SoFullSceneAntialiasingElement();
131};
132
133#endif /* _SO_FULL_SCENE_ANTIALIASING_ELEMENT_ */
134
135
friend class SoState
Definition SoElement.h:406
static void set(SoState *state, SbBool on, SbBool currOn, int filter)
Sets the current Full-Scene Antialising attributes in the state.
static SoFullSceneAntialiasingElement * getInstance(const SoState *state)
Returns the top (current) instance of the element in the state.
static SbBool get(SoState *state, SbBool &on, SbBool &pointsOn, SbBool &linesOn, SbBool &polygonsOn, SbBool &textsOn, int &filter)
Gets the current Full-Scene Antialising attributes in the state.
static void setSampleCount(SoState *state, uint8_t sampleCount)
Set the sample count to be used for Full-Scene Antialiasing.
virtual void push(SoState *state)
Push copies the values from the previous element.
static SbBool getDefault(SbBool &on, SbBool &pointsOn, SbBool &linesOn, SbBool &polygonsOn, SbBool &textsOn, int &filter, uint8_t &sampleCount)
Returns the default values.
static SbBool getDefault(SbBool &on, SbBool &pointsOn, SbBool &linesOn, SbBool &polygonsOn, SbBool &textsOn, int &filter)
Returns the default values.
int SbBool
Boolean type.
Definition SbBase.h:87