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 \*---------------------------------------------------------------------------*/
40 #ifndef _OSGTRANSFORMCHUNK_H_
41 #define _OSGTRANSFORMCHUNK_H_
46 #include "OSGTransformChunkBase.h"
50 /*! \brief State chunk for transformation. See \ref PageSystemTransformChunk
52 \ingroup GrpStateOpenGLObj
53 \ingroup GrpLibOSGState
57 class OSG_STATE_DLLMAPPING TransformChunk
: public TransformChunkBase
59 /*========================== PUBLIC =================================*/
63 /*---------------------------------------------------------------------*/
64 /*! \name Chunk Class Access */
67 virtual const StateChunkClass
*getClass(void) const;
70 /*---------------------------------------------------------------------*/
71 /*! \name Static Chunk Class Access */
74 static UInt32
getStaticClassId(void);
75 static const StateChunkClass
*getStaticClass (void);
78 /*---------------------------------------------------------------------*/
82 virtual void changed(ConstFieldMaskArg whichField
,
87 /*---------------------------------------------------------------------*/
91 virtual void dump( UInt32 uiIndent
= 0,
92 const BitVector bvFlags
= 0) const;
95 /*---------------------------------------------------------------------*/
99 virtual void activate (DrawEnv
*pEnv
,
102 virtual void changeFrom(DrawEnv
*pEnv
,
106 virtual void deactivate(DrawEnv
*pEnv
,
110 /*---------------------------------------------------------------------*/
111 /*! \name Comparison */
114 virtual Real32
switchCost(StateChunk
*chunk
);
116 virtual bool operator < (const StateChunk
&other
) const;
118 virtual bool operator ==(const StateChunk
&other
) const;
119 virtual bool operator !=(const StateChunk
&other
) const;
122 /*========================= PROTECTED ===============================*/
126 /*---------------------------------------------------------------------*/
127 /*! \name Constructors */
130 TransformChunk(void);
131 TransformChunk(const TransformChunk
&source
);
134 /*---------------------------------------------------------------------*/
135 /*! \name Destructors */
138 virtual ~TransformChunk(void);
141 /*---------------------------------------------------------------------*/
145 static void initMethod(InitPhase ePhase
);
148 /*========================== PRIVATE ================================*/
152 typedef TransformChunkBase Inherited
;
154 friend class FieldContainer
;
155 friend class TransformChunkBase
;
157 /*---------------------------------------------------------------------*/
159 // class. Used for indexing in State
160 static StateChunkClass _class
;
162 /*---------------------------------------------------------------------*/
164 // prohibit default functions (move to 'public' if you need one)
165 void operator =(const TransformChunk
&source
);
168 typedef TransformChunk
*TransformChunkP
;
172 #include "OSGTransformChunkBase.inl"
173 #include "OSGTransformChunk.inl"
175 #endif /* _OSGTRANSFORMCHUNK_H_ */