1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGCOLORMASKCHUNK_H_
40 #define _OSGCOLORMASKCHUNK_H_
45 #include "OSGColorMaskChunkBase.h"
49 /*! \brief ColorMaskChunk class. See \ref PageSystemColorMaskChunk
51 \ingroup GrpSystemStateBaseChunks
52 \ingroup GrpLibOSGSystem
56 class OSG_SYSTEM_DLLMAPPING ColorMaskChunk
: public ColorMaskChunkBase
60 /*========================== PUBLIC =================================*/
64 typedef ColorMaskChunkBase Inherited
;
66 /*---------------------------------------------------------------------*/
67 /*! \name Chunk Class Access */
70 virtual const StateChunkClass
*getClass(void) const;
73 /*---------------------------------------------------------------------*/
74 /*! \name Static Chunk Class Access */
77 static UInt32
getStaticClassId(void);
78 static const StateChunkClass
*getStaticClass (void);
81 /*---------------------------------------------------------------------*/
82 /*! \name State Commands */
85 virtual void activate (DrawEnv
*pEnv
,
88 virtual void changeFrom (DrawEnv
*pEnv
,
92 virtual void deactivate (DrawEnv
*pEnv
,
96 /*---------------------------------------------------------------------*/
97 /*! \name Comparison */
100 virtual Real32
switchCost (StateChunk
*chunk
);
102 virtual bool operator < (const StateChunk
&other
) const;
104 virtual bool operator == (const StateChunk
&other
) const;
105 virtual bool operator != (const StateChunk
&other
) const;
108 /*---------------------------------------------------------------------*/
112 virtual void changed(ConstFieldMaskArg whichField
,
117 /*---------------------------------------------------------------------*/
121 virtual void dump( UInt32 uiIndent
= 0,
122 const BitVector bvFlags
= 0) const;
125 /*---------------------------------------------------------------------*/
126 /*! \name Field Set */
129 void setMask(const bool &r
,
134 /*========================= PROTECTED ===============================*/
138 // Variables should all be in ColorMaskChunkBase.
140 /*---------------------------------------------------------------------*/
141 /*! \name Constructors */
144 ColorMaskChunk(void);
145 ColorMaskChunk(const ColorMaskChunk
&source
);
148 /*---------------------------------------------------------------------*/
149 /*! \name Destructors */
152 virtual ~ColorMaskChunk(void);
155 /*---------------------------------------------------------------------*/
159 static void initMethod(InitPhase ePhase
);
162 /*========================== PRIVATE ================================*/
166 friend class FieldContainer
;
167 friend class ColorMaskChunkBase
;
169 // class. Used for indexing in State
170 static StateChunkClass _class
;
172 // prohibit default functions (move to 'public' if you need one)
173 void operator =(const ColorMaskChunk
&source
);
176 typedef ColorMaskChunk
*ColorMaskChunkP
;
180 #include "OSGColorMaskChunkBase.inl"
181 #include "OSGColorMaskChunk.inl"
183 #endif /* _OSGCOLORMASKCHUNK_H_ */