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 _OSGLIGHTCHUNK_H_
40 #define _OSGLIGHTCHUNK_H_
45 #include "OSGLightChunkBase.h"
49 /*! \brief State chunk for lights. See \ref PageSystemLightChunk
51 \ingroup GrpSystemStateBaseChunks
52 \ingroup GrpLibOSGSystem
56 class OSG_SYSTEM_DLLMAPPING LightChunk
: public LightChunkBase
58 /*========================== PUBLIC =================================*/
62 /*---------------------------------------------------------------------*/
63 /*! \name Chunk Class Access */
66 virtual const StateChunkClass
*getClass(void) const;
69 /*---------------------------------------------------------------------*/
70 /*! \name Static Chunk Class Access */
73 static UInt32
getStaticClassId(void);
74 static const StateChunkClass
*getStaticClass (void);
77 /*---------------------------------------------------------------------*/
81 virtual void changed(ConstFieldMaskArg whichField
,
86 /*---------------------------------------------------------------------*/
90 virtual void dump( UInt32 uiIndent
= 0,
91 const BitVector bvFlags
= 0) const;
94 /*---------------------------------------------------------------------*/
98 virtual void activate (DrawEnv
*action
,
101 virtual void changeFrom(DrawEnv
*action
,
105 virtual void deactivate(DrawEnv
*action
,
109 /*---------------------------------------------------------------------*/
110 /*! \name Comparison */
113 virtual Real32
switchCost (StateChunk
*chunk
);
115 virtual bool operator < (const StateChunk
&other
) const;
117 virtual bool operator == (const StateChunk
&other
) const;
118 virtual bool operator != (const StateChunk
&other
) const;
122 /*========================= PROTECTED ===============================*/
126 /*---------------------------------------------------------------------*/
127 /*! \name Constructors */
131 LightChunk(const LightChunk
&source
);
134 /*---------------------------------------------------------------------*/
135 /*! \name Destructors */
138 virtual ~LightChunk(void);
141 /*---------------------------------------------------------------------*/
145 static void initMethod(InitPhase ePhase
);
148 /*========================== PRIVATE ================================*/
152 typedef LightChunkBase Inherited
;
154 friend class FieldContainer
;
155 friend class LightChunkBase
;
157 // class. Used for indexing in State
158 static StateChunkClass _class
;
160 // prohibit default functions (move to 'public' if you need one)
161 void operator =(const LightChunk
&source
);
164 typedef LightChunk
*LightChunkP
;
168 #include "OSGLightChunkBase.inl"
169 #include "OSGLightChunk.inl"
171 #endif /* _OSGLIGHTCHUNK_H_ */