changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / Light / Shadow / Base / OSGShadowMapEngineBase.h
blobadf4e2e79bd2349cc0b9740e1b0f21e9b129624a
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class ShadowMapEngine
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSHADOWMAPENGINEBASE_H_
55 #define _OSGSHADOWMAPENGINEBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
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"
75 OSG_BEGIN_NAMESPACE
78 class ShadowMapEngine;
80 //! \brief ShadowMapEngine Base Class.
82 class OSG_GROUP_DLLMAPPING ShadowMapEngineBase : public ShadowMapEngineParent
84 public:
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 =================================*/
96 public:
98 enum
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 */
133 /*! \{ */
135 static FieldContainerType &getClassType (void);
136 static UInt32 getClassTypeId (void);
137 static UInt16 getClassGroupId(void);
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name FieldContainer Get */
142 /*! \{ */
144 virtual FieldContainerType &getType (void);
145 virtual const FieldContainerType &getType (void) const;
147 virtual UInt32 getContainerSize(void) const;
149 /*! \} */
150 /*---------------------------------------------------------------------*/
151 /*! \name Field Get */
152 /*! \{ */
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;
190 /*! \} */
191 /*---------------------------------------------------------------------*/
192 /*! \name Field Set */
193 /*! \{ */
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);
202 /*! \} */
203 /*---------------------------------------------------------------------*/
204 /*! \name Ptr Field Set */
205 /*! \{ */
207 /*! \} */
208 /*---------------------------------------------------------------------*/
209 /*! \name Ptr MField Set */
210 /*! \{ */
212 /*! \} */
213 /*---------------------------------------------------------------------*/
214 /*! \name Binary Access */
215 /*! \{ */
217 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
218 virtual void copyToBin (BinaryDataHandler &pMem,
219 ConstFieldMaskArg whichField);
220 virtual void copyFromBin(BinaryDataHandler &pMem,
221 ConstFieldMaskArg whichField);
224 /*! \} */
225 /*========================= PROTECTED ===============================*/
227 protected:
229 static TypeObject _type;
231 static void classDescInserter(TypeObject &oType);
232 static const Char8 *getClassname (void );
234 /*---------------------------------------------------------------------*/
235 /*! \name Fields */
236 /*! \{ */
238 SFUnrecTextureObjChunkPtr _sfShadowTexChunk;
239 SFInt32 _sfWidth;
240 SFInt32 _sfHeight;
241 SFReal32 _sfOffsetBias;
242 SFReal32 _sfOffsetFactor;
243 SFUInt32 _sfShadowTravMask;
245 /*! \} */
246 /*---------------------------------------------------------------------*/
247 /*! \name Constructors */
248 /*! \{ */
250 ShadowMapEngineBase(void);
251 ShadowMapEngineBase(const ShadowMapEngineBase &source);
253 /*! \} */
254 /*---------------------------------------------------------------------*/
255 /*! \name Destructors */
256 /*! \{ */
258 virtual ~ShadowMapEngineBase(void);
260 /*! \} */
261 /*---------------------------------------------------------------------*/
262 /*! \name onCreate */
263 /*! \{ */
265 void onCreate(const ShadowMapEngine *source = NULL);
267 /*! \} */
268 /*---------------------------------------------------------------------*/
269 /*! \name Generic Field Access */
270 /*! \{ */
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);
285 /*! \} */
286 /*---------------------------------------------------------------------*/
287 /*! \name Sync */
288 /*! \{ */
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);
302 #endif
304 /*! \} */
305 /*---------------------------------------------------------------------*/
306 /*! \name Edit */
307 /*! \{ */
309 /*! \} */
310 /*---------------------------------------------------------------------*/
311 /*! \name Aspect Create */
312 /*! \{ */
314 /*! \} */
315 /*---------------------------------------------------------------------*/
316 /*! \name Edit */
317 /*! \{ */
318 /*! \} */
319 /*---------------------------------------------------------------------*/
320 /*! \name Sync */
321 /*! \{ */
323 virtual void resolveLinks(void);
325 /*! \} */
326 /*========================== PRIVATE ================================*/
328 private:
329 /*---------------------------------------------------------------------*/
331 // prohibit default functions (move to 'public' if you need one)
332 void operator =(const ShadowMapEngineBase &source);
335 typedef ShadowMapEngineBase *ShadowMapEngineBaseP;
337 OSG_END_NAMESPACE
339 #endif /* _OSGSHADOWMAPENGINEBASE_H_ */