Open Inventor Reference
SoStencilBitsElement.h
Go to the documentation of this file.
1 // **InsertLicense** code
2 
3 #ifndef _SO_STENCIL_BITS_ELEMENT_
4 #define _SO_STENCIL_BITS_ELEMENT_
5 
8 
10 {
11  typedef SoInt32Element inherited;
12 
14 
15  public:
16 
18  virtual void init(SoState *state);
19 
23  static uint32_t acquireBits(SoState *state, SoNode *node, int num);
24 
26  static void releaseBits(SoState *state, uint32_t mask);
27 
32  static void clearBitsInUse(SoState *state);
33 
35  static uint32_t get(SoState *state) {
36  return (uint32_t)SoInt32Element::get(classStackIndex, state);
37  }
38 
40  static uint32_t getDefault() {
41  return 0x0;
42  }
43 
45  static int getNumRemainingBits(SoState *state);
46 
48  virtual void push(SoState *state);
49 
50  protected:
51 
53  static int getNumBitPositionsToShift(uint32_t mask, SoState *state);
54 
57 
59  int getNumGLBits() const;
60 
61  SoINTERNAL public:
62 
64  static void initClass();
65 
66  private:
67 
69  mutable int numGLBits;
70 };
71 
72 #endif // _SO_STENCIL_BITS_ELEMENT_
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
Definition: SbBasic.h:154
#define SoINTERNAL
Definition: SbBasic.h:155
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Definition: SbSystem.h:81
unsigned int uint32_t
Definition: SbTypeDefs.h:44
#define SO_ELEMENT_HEADER(className)
This one is for non-abstract element classes.
Definition: SoSubElement.h:112
Subclasses store a single int32_t, int, or enum value.
static int32_t get(int stackIndex, SoState *state)
Get value.
Abstract base class for all database nodes.
Definition: SoNode.h:103
An SoState collects and holds state while traversing a scene graph.
Definition: SoState.h:82
static int getNumBitPositionsToShift(uint32_t mask, SoState *state)
Number of positions a value must be shifted according to mask.
static void releaseBits(SoState *state, uint32_t mask)
Releases the stencil bits specified by the mask.
static uint32_t acquireBits(SoState *state, SoNode *node, int num)
Acquires a certain number of bits for stencil operations.
int getNumGLBits() const
Returns the number of bits supported by GL implementation.
static void clearBitsInUse(SoState *state)
Forget about the stencil bits in use.
static uint32_t getDefault()
Returns the default mask of stencil bits in use.
static uint32_t get(SoState *state)
Returns a mask of the current stencil bits in use.
virtual ~SoStencilBitsElement()
Destructor.
static int getNumRemainingBits(SoState *state)
Returns the number of stencil bits not currently used.
virtual void push(SoState *state)
Overrides push() method to copy values from next instance in the stack.
static void initClass()
Initializes the SoStencilBitsElement class.
virtual void init(SoState *state)
Initializes element.