Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoLogicOperationElement.h
1/*=======================================================================
2** Author : Charles Huet (06 2015)
3**=======================================================================*/
4/*=======================================================================
5 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
6 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
7 *** ***
8 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
9 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
10 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
11 *** ***
12 *** RESTRICTED RIGHTS LEGEND ***
13 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
14 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
15 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
16 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
17 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
18 *** ***
19 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
20 *** BORDEAUX, FRANCE ***
21 *** ALL RIGHTS RESERVED ***
22**=======================================================================*/
23/*=======================================================================
24** Modified by : VSG (MMM YYYY)
25**=======================================================================*/
26
27#ifndef _SO_LOGIC_OPERATION_ELEMENT_H
28#define _SO_LOGIC_OPERATION_ELEMENT_H
29
30#include <Inventor/elements/SoElement.h>
31#include <Inventor/elements/SoSubElement.h>
32#include <Inventor/SbEnums.h>
33
47{
48 SO_ELEMENT_HEADER( SoLogicOperationElement );
49
50public:
55 {
56 NOOP = SbEnums::LOGIC_OP_NOOP,
57 CLEAR = SbEnums::LOGIC_OP_CLEAR,
58 SET = SbEnums::LOGIC_OP_SET,
59 COPY = SbEnums::LOGIC_OP_COPY,
60 COPY_INVERTED = SbEnums::LOGIC_OP_COPY_INVERTED,
61 INVERT = SbEnums::LOGIC_OP_INVERT,
62 AND = SbEnums::LOGIC_OP_AND,
63 NAND = SbEnums::LOGIC_OP_NAND,
64 AND_REVERSE = SbEnums::LOGIC_OP_AND_REVERSE,
65 AND_INVERTED = SbEnums::LOGIC_OP_AND_INVERTED,
66 OR = SbEnums::LOGIC_OP_OR,
67 NOR = SbEnums::LOGIC_OP_NOR,
68 XOR = SbEnums::LOGIC_OP_XOR,
69 OR_REVERSE = SbEnums::LOGIC_OP_OR_REVERSE,
70 OR_INVERTED = SbEnums::LOGIC_OP_OR_INVERTED,
71 EQUIV = SbEnums::LOGIC_OP_EQUIV,
72 };
73
74
75
82 static void set( SoState* state, bool enable, LogicOperation operation );
83
90 static void get( SoState* state, bool& enabled, LogicOperation& operation );
91
95 virtual void print( FILE* fp ) const;
96
100 virtual void push( SoState* state );
101
105 virtual void pop( SoState* state, const SoElement* prevTopElement );
106
107private:
109
111 virtual void init( SoState* state );
112
116 virtual SbBool matches( const SoElement* element ) const;
117
121 virtual SoElement* copyMatchInfo() const;
122
123private:
124
126 static void initClass();
127
129 static void exitClass();
130
131 virtual void setElt( const bool enable, const LogicOperation operation );
132
133private:
134 bool m_enabled;
135 LogicOperation m_operation;
136};
137
138#endif // _SO_LOGIC_OPERATION_ELEMENT_H
Abstract base class for all state elements.
Definition SoElement.h:102
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Stores the curre...
virtual void push(SoState *state)
Override push() method to keep GL up to date.
static void set(SoState *state, bool enable, LogicOperation operation)
set the current logic operation
LogicOperation
Logic Operation as defined by OpenGL's logicOp enum.
virtual void pop(SoState *state, const SoElement *prevTopElement)
Override pop() method to keep GL up to date.
virtual void print(FILE *fp) const
Prints element (for debugging).
static void get(SoState *state, bool &enabled, LogicOperation &operation)
get the current logic operation, and wether logic operations are enabled.
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87