1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class ShadowMapEngine
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSHADOWMAPENGINEBASE_H_
55 #define _OSGSHADOWMAPENGINEBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGLightEngine.h" // Parent
68 #include "OSGTextureObjChunkFields.h" // ShadowTexChunk type
69 #include "OSGSysFields.h" // Width type
71 #include "OSGShadowMapEngineFields.h"
73 #include "OSGShadowMapEngineParent.h"
78 class ShadowMapEngine
;
80 //! \brief ShadowMapEngine Base Class.
82 class OSG_GROUP_DLLMAPPING ShadowMapEngineBase
: public ShadowMapEngineParent
86 typedef ShadowMapEngineParent Inherited
;
87 typedef LightEngine ParentContainer
;
89 typedef Inherited::TypeObject TypeObject
;
90 typedef TypeObject::InitPhase InitPhase
;
92 OSG_GEN_INTERNALPTR(ShadowMapEngine
);
94 /*========================== PUBLIC =================================*/
100 ShadowTexChunkFieldId
= Inherited::NextFieldId
,
101 WidthFieldId
= ShadowTexChunkFieldId
+ 1,
102 HeightFieldId
= WidthFieldId
+ 1,
103 OffsetBiasFieldId
= HeightFieldId
+ 1,
104 OffsetFactorFieldId
= OffsetBiasFieldId
+ 1,
105 ShadowTravMaskFieldId
= OffsetFactorFieldId
+ 1,
106 NextFieldId
= ShadowTravMaskFieldId
+ 1
109 static const OSG::BitVector ShadowTexChunkFieldMask
=
110 (TypeTraits
<BitVector
>::One
<< ShadowTexChunkFieldId
);
111 static const OSG::BitVector WidthFieldMask
=
112 (TypeTraits
<BitVector
>::One
<< WidthFieldId
);
113 static const OSG::BitVector HeightFieldMask
=
114 (TypeTraits
<BitVector
>::One
<< HeightFieldId
);
115 static const OSG::BitVector OffsetBiasFieldMask
=
116 (TypeTraits
<BitVector
>::One
<< OffsetBiasFieldId
);
117 static const OSG::BitVector OffsetFactorFieldMask
=
118 (TypeTraits
<BitVector
>::One
<< OffsetFactorFieldId
);
119 static const OSG::BitVector ShadowTravMaskFieldMask
=
120 (TypeTraits
<BitVector
>::One
<< ShadowTravMaskFieldId
);
121 static const OSG::BitVector NextFieldMask
=
122 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
124 typedef SFUnrecTextureObjChunkPtr SFShadowTexChunkType
;
125 typedef SFInt32 SFWidthType
;
126 typedef SFInt32 SFHeightType
;
127 typedef SFReal32 SFOffsetBiasType
;
128 typedef SFReal32 SFOffsetFactorType
;
129 typedef SFUInt32 SFShadowTravMaskType
;
131 /*---------------------------------------------------------------------*/
132 /*! \name Class Get */
135 static FieldContainerType
&getClassType (void);
136 static UInt32
getClassTypeId (void);
137 static UInt16
getClassGroupId(void);
140 /*---------------------------------------------------------------------*/
141 /*! \name FieldContainer Get */
144 virtual FieldContainerType
&getType (void);
145 virtual const FieldContainerType
&getType (void) const;
147 virtual UInt32
getContainerSize(void) const;
150 /*---------------------------------------------------------------------*/
151 /*! \name Field Get */
154 const SFUnrecTextureObjChunkPtr
*getSFShadowTexChunk (void) const;
155 SFUnrecTextureObjChunkPtr
*editSFShadowTexChunk (void);
157 SFInt32
*editSFWidth (void);
158 const SFInt32
*getSFWidth (void) const;
160 SFInt32
*editSFHeight (void);
161 const SFInt32
*getSFHeight (void) const;
163 SFReal32
*editSFOffsetBias (void);
164 const SFReal32
*getSFOffsetBias (void) const;
166 SFReal32
*editSFOffsetFactor (void);
167 const SFReal32
*getSFOffsetFactor (void) const;
169 SFUInt32
*editSFShadowTravMask (void);
170 const SFUInt32
*getSFShadowTravMask (void) const;
173 TextureObjChunk
* getShadowTexChunk (void) const;
175 Int32
&editWidth (void);
176 Int32
getWidth (void) const;
178 Int32
&editHeight (void);
179 Int32
getHeight (void) const;
181 Real32
&editOffsetBias (void);
182 Real32
getOffsetBias (void) const;
184 Real32
&editOffsetFactor (void);
185 Real32
getOffsetFactor (void) const;
187 UInt32
&editShadowTravMask (void);
188 UInt32
getShadowTravMask (void) const;
191 /*---------------------------------------------------------------------*/
192 /*! \name Field Set */
195 void setShadowTexChunk (TextureObjChunk
* const value
);
196 void setWidth (const Int32 value
);
197 void setHeight (const Int32 value
);
198 void setOffsetBias (const Real32 value
);
199 void setOffsetFactor (const Real32 value
);
200 void setShadowTravMask (const UInt32 value
);
203 /*---------------------------------------------------------------------*/
204 /*! \name Ptr Field Set */
208 /*---------------------------------------------------------------------*/
209 /*! \name Ptr MField Set */
213 /*---------------------------------------------------------------------*/
214 /*! \name Binary Access */
217 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
218 virtual void copyToBin (BinaryDataHandler
&pMem
,
219 ConstFieldMaskArg whichField
);
220 virtual void copyFromBin(BinaryDataHandler
&pMem
,
221 ConstFieldMaskArg whichField
);
225 /*========================= PROTECTED ===============================*/
229 static TypeObject _type
;
231 static void classDescInserter(TypeObject
&oType
);
232 static const Char8
*getClassname (void );
234 /*---------------------------------------------------------------------*/
238 SFUnrecTextureObjChunkPtr _sfShadowTexChunk
;
241 SFReal32 _sfOffsetBias
;
242 SFReal32 _sfOffsetFactor
;
243 SFUInt32 _sfShadowTravMask
;
246 /*---------------------------------------------------------------------*/
247 /*! \name Constructors */
250 ShadowMapEngineBase(void);
251 ShadowMapEngineBase(const ShadowMapEngineBase
&source
);
254 /*---------------------------------------------------------------------*/
255 /*! \name Destructors */
258 virtual ~ShadowMapEngineBase(void);
261 /*---------------------------------------------------------------------*/
262 /*! \name onCreate */
265 void onCreate(const ShadowMapEngine
*source
= NULL
);
268 /*---------------------------------------------------------------------*/
269 /*! \name Generic Field Access */
272 GetFieldHandlePtr
getHandleShadowTexChunk (void) const;
273 EditFieldHandlePtr
editHandleShadowTexChunk (void);
274 GetFieldHandlePtr
getHandleWidth (void) const;
275 EditFieldHandlePtr
editHandleWidth (void);
276 GetFieldHandlePtr
getHandleHeight (void) const;
277 EditFieldHandlePtr
editHandleHeight (void);
278 GetFieldHandlePtr
getHandleOffsetBias (void) const;
279 EditFieldHandlePtr
editHandleOffsetBias (void);
280 GetFieldHandlePtr
getHandleOffsetFactor (void) const;
281 EditFieldHandlePtr
editHandleOffsetFactor (void);
282 GetFieldHandlePtr
getHandleShadowTravMask (void) const;
283 EditFieldHandlePtr
editHandleShadowTravMask (void);
286 /*---------------------------------------------------------------------*/
290 #ifdef OSG_MT_CPTR_ASPECT
291 virtual void execSyncV( FieldContainer
&oFrom
,
292 ConstFieldMaskArg whichField
,
293 AspectOffsetStore
&oOffsets
,
294 ConstFieldMaskArg syncMode
,
295 const UInt32 uiSyncInfo
);
297 void execSync ( ShadowMapEngineBase
*pFrom
,
298 ConstFieldMaskArg whichField
,
299 AspectOffsetStore
&oOffsets
,
300 ConstFieldMaskArg syncMode
,
301 const UInt32 uiSyncInfo
);
305 /*---------------------------------------------------------------------*/
310 /*---------------------------------------------------------------------*/
311 /*! \name Aspect Create */
315 /*---------------------------------------------------------------------*/
319 /*---------------------------------------------------------------------*/
323 virtual void resolveLinks(void);
326 /*========================== PRIVATE ================================*/
329 /*---------------------------------------------------------------------*/
331 // prohibit default functions (move to 'public' if you need one)
332 void operator =(const ShadowMapEngineBase
&source
);
335 typedef ShadowMapEngineBase
*ShadowMapEngineBaseP
;
339 #endif /* _OSGSHADOWMAPENGINEBASE_H_ */