fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Groups / Light / Shadow / Engines / OSGShaderShadowMapEngineDataBase.h
blob247b9b8c9998d7d10e443c2f53da0d9bd1f21af5
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 ShaderShadowMapEngineData
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSHADERSHADOWMAPENGINEDATABASE_H_
55 #define _OSGSHADERSHADOWMAPENGINEDATABASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGStageData.h" // Parent
68 #include "OSGFrameBufferObjectFields.h" // RenderTargets type
69 #include "OSGTextureBufferFields.h" // ShadowTexBuffers type
70 #include "OSGTextureObjChunkFields.h" // ShadowTexChunk type
71 #include "OSGImageFields.h" // ShadowTexImage type
72 #include "OSGChunkMaterialFields.h" // LightPassMaterials type
73 #include "OSGBackgroundFields.h" // Background type
75 #include "OSGShaderShadowMapEngineDataFields.h"
77 OSG_BEGIN_NAMESPACE
80 class ShaderShadowMapEngineData;
82 //! \brief ShaderShadowMapEngineData Base Class.
84 class OSG_GROUP_DLLMAPPING ShaderShadowMapEngineDataBase : public StageData
86 public:
88 typedef StageData Inherited;
89 typedef StageData ParentContainer;
91 typedef Inherited::TypeObject TypeObject;
92 typedef TypeObject::InitPhase InitPhase;
94 OSG_GEN_INTERNALPTR(ShaderShadowMapEngineData);
96 /*========================== PUBLIC =================================*/
98 public:
100 enum
102 RenderTargetsFieldId = Inherited::NextFieldId,
103 ShadowTexBuffersFieldId = RenderTargetsFieldId + 1,
104 ShadowTexChunkFieldId = ShadowTexBuffersFieldId + 1,
105 ShadowTexImageFieldId = ShadowTexChunkFieldId + 1,
106 LightPassMaterialsFieldId = ShadowTexImageFieldId + 1,
107 BackgroundFieldId = LightPassMaterialsFieldId + 1,
108 NextFieldId = BackgroundFieldId + 1
111 static const OSG::BitVector RenderTargetsFieldMask =
112 (TypeTraits<BitVector>::One << RenderTargetsFieldId);
113 static const OSG::BitVector ShadowTexBuffersFieldMask =
114 (TypeTraits<BitVector>::One << ShadowTexBuffersFieldId);
115 static const OSG::BitVector ShadowTexChunkFieldMask =
116 (TypeTraits<BitVector>::One << ShadowTexChunkFieldId);
117 static const OSG::BitVector ShadowTexImageFieldMask =
118 (TypeTraits<BitVector>::One << ShadowTexImageFieldId);
119 static const OSG::BitVector LightPassMaterialsFieldMask =
120 (TypeTraits<BitVector>::One << LightPassMaterialsFieldId);
121 static const OSG::BitVector BackgroundFieldMask =
122 (TypeTraits<BitVector>::One << BackgroundFieldId);
123 static const OSG::BitVector NextFieldMask =
124 (TypeTraits<BitVector>::One << NextFieldId);
126 typedef MFUnrecFrameBufferObjectPtr MFRenderTargetsType;
127 typedef MFUnrecTextureBufferPtr MFShadowTexBuffersType;
128 typedef SFUnrecTextureObjChunkPtr SFShadowTexChunkType;
129 typedef SFUnrecImagePtr SFShadowTexImageType;
130 typedef MFUnrecChunkMaterialPtr MFLightPassMaterialsType;
131 typedef SFUnrecBackgroundPtr SFBackgroundType;
133 /*---------------------------------------------------------------------*/
134 /*! \name Class Get */
135 /*! \{ */
137 static FieldContainerType &getClassType (void);
138 static UInt32 getClassTypeId (void);
139 static UInt16 getClassGroupId(void);
141 /*! \} */
142 /*---------------------------------------------------------------------*/
143 /*! \name FieldContainer Get */
144 /*! \{ */
146 virtual FieldContainerType &getType (void);
147 virtual const FieldContainerType &getType (void) const;
149 virtual UInt32 getContainerSize(void) const;
151 /*! \} */
152 /*---------------------------------------------------------------------*/
153 /*! \name Field Get */
154 /*! \{ */
156 const MFUnrecFrameBufferObjectPtr *getMFRenderTargets (void) const;
157 MFUnrecFrameBufferObjectPtr *editMFRenderTargets (void);
158 const MFUnrecTextureBufferPtr *getMFShadowTexBuffers(void) const;
159 MFUnrecTextureBufferPtr *editMFShadowTexBuffers(void);
160 const SFUnrecTextureObjChunkPtr *getSFShadowTexChunk (void) const;
161 SFUnrecTextureObjChunkPtr *editSFShadowTexChunk (void);
162 const SFUnrecImagePtr *getSFShadowTexImage (void) const;
163 SFUnrecImagePtr *editSFShadowTexImage (void);
164 const MFUnrecChunkMaterialPtr *getMFLightPassMaterials(void) const;
165 MFUnrecChunkMaterialPtr *editMFLightPassMaterials(void);
166 const SFUnrecBackgroundPtr *getSFBackground (void) const;
167 SFUnrecBackgroundPtr *editSFBackground (void);
170 FrameBufferObject * getRenderTargets (const UInt32 index) const;
172 TextureBuffer * getShadowTexBuffers(const UInt32 index) const;
174 TextureObjChunk * getShadowTexChunk (void) const;
176 Image * getShadowTexImage (void) const;
178 ChunkMaterial * getLightPassMaterials(const UInt32 index) const;
180 Background * getBackground (void) const;
182 /*! \} */
183 /*---------------------------------------------------------------------*/
184 /*! \name Field Set */
185 /*! \{ */
187 void setShadowTexChunk (TextureObjChunk * const value);
188 void setShadowTexImage (Image * const value);
189 void setBackground (Background * const value);
191 /*! \} */
192 /*---------------------------------------------------------------------*/
193 /*! \name Ptr Field Set */
194 /*! \{ */
196 /*! \} */
197 /*---------------------------------------------------------------------*/
198 /*! \name Ptr MField Set */
199 /*! \{ */
201 void pushToRenderTargets (FrameBufferObject * const value );
202 void assignRenderTargets (const MFUnrecFrameBufferObjectPtr &value);
203 void removeFromRenderTargets (UInt32 uiIndex );
204 void removeObjFromRenderTargets(FrameBufferObject * const value );
205 void clearRenderTargets (void );
207 void pushToShadowTexBuffers (TextureBuffer * const value );
208 void assignShadowTexBuffers (const MFUnrecTextureBufferPtr &value);
209 void removeFromShadowTexBuffers (UInt32 uiIndex );
210 void removeObjFromShadowTexBuffers(TextureBuffer * const value );
211 void clearShadowTexBuffers (void );
213 void pushToLightPassMaterials (ChunkMaterial * const value );
214 void assignLightPassMaterials (const MFUnrecChunkMaterialPtr &value);
215 void removeFromLightPassMaterials (UInt32 uiIndex );
216 void removeObjFromLightPassMaterials(ChunkMaterial * const value );
217 void clearLightPassMaterials (void );
219 /*! \} */
220 /*---------------------------------------------------------------------*/
221 /*! \name Binary Access */
222 /*! \{ */
224 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
225 virtual void copyToBin (BinaryDataHandler &pMem,
226 ConstFieldMaskArg whichField);
227 virtual void copyFromBin(BinaryDataHandler &pMem,
228 ConstFieldMaskArg whichField);
231 /*! \} */
232 /*---------------------------------------------------------------------*/
233 /*! \name Construction */
234 /*! \{ */
236 static ShaderShadowMapEngineDataTransitPtr create (void);
237 static ShaderShadowMapEngineData *createEmpty (void);
239 static ShaderShadowMapEngineDataTransitPtr createLocal (
240 BitVector bFlags = FCLocal::All);
242 static ShaderShadowMapEngineData *createEmptyLocal(
243 BitVector bFlags = FCLocal::All);
245 static ShaderShadowMapEngineDataTransitPtr createDependent (BitVector bFlags);
247 /*! \} */
248 /*---------------------------------------------------------------------*/
249 /*! \name Copy */
250 /*! \{ */
252 virtual FieldContainerTransitPtr shallowCopy (void) const;
253 virtual FieldContainerTransitPtr shallowCopyLocal(
254 BitVector bFlags = FCLocal::All) const;
255 virtual FieldContainerTransitPtr shallowCopyDependent(
256 BitVector bFlags) const;
258 /*! \} */
259 /*========================= PROTECTED ===============================*/
261 protected:
263 static TypeObject _type;
265 static void classDescInserter(TypeObject &oType);
266 static const Char8 *getClassname (void );
268 /*---------------------------------------------------------------------*/
269 /*! \name Fields */
270 /*! \{ */
272 MFUnrecFrameBufferObjectPtr _mfRenderTargets;
273 MFUnrecTextureBufferPtr _mfShadowTexBuffers;
274 SFUnrecTextureObjChunkPtr _sfShadowTexChunk;
275 SFUnrecImagePtr _sfShadowTexImage;
276 MFUnrecChunkMaterialPtr _mfLightPassMaterials;
277 SFUnrecBackgroundPtr _sfBackground;
279 /*! \} */
280 /*---------------------------------------------------------------------*/
281 /*! \name Constructors */
282 /*! \{ */
284 ShaderShadowMapEngineDataBase(void);
285 ShaderShadowMapEngineDataBase(const ShaderShadowMapEngineDataBase &source);
287 /*! \} */
288 /*---------------------------------------------------------------------*/
289 /*! \name Destructors */
290 /*! \{ */
292 virtual ~ShaderShadowMapEngineDataBase(void);
294 /*! \} */
295 /*---------------------------------------------------------------------*/
296 /*! \name onCreate */
297 /*! \{ */
299 void onCreate(const ShaderShadowMapEngineData *source = NULL);
301 /*! \} */
302 /*---------------------------------------------------------------------*/
303 /*! \name Generic Field Access */
304 /*! \{ */
306 GetFieldHandlePtr getHandleRenderTargets (void) const;
307 EditFieldHandlePtr editHandleRenderTargets (void);
308 GetFieldHandlePtr getHandleShadowTexBuffers (void) const;
309 EditFieldHandlePtr editHandleShadowTexBuffers(void);
310 GetFieldHandlePtr getHandleShadowTexChunk (void) const;
311 EditFieldHandlePtr editHandleShadowTexChunk (void);
312 GetFieldHandlePtr getHandleShadowTexImage (void) const;
313 EditFieldHandlePtr editHandleShadowTexImage (void);
314 GetFieldHandlePtr getHandleLightPassMaterials (void) const;
315 EditFieldHandlePtr editHandleLightPassMaterials(void);
316 GetFieldHandlePtr getHandleBackground (void) const;
317 EditFieldHandlePtr editHandleBackground (void);
319 /*! \} */
320 /*---------------------------------------------------------------------*/
321 /*! \name Sync */
322 /*! \{ */
324 #ifdef OSG_MT_CPTR_ASPECT
325 virtual void execSyncV( FieldContainer &oFrom,
326 ConstFieldMaskArg whichField,
327 AspectOffsetStore &oOffsets,
328 ConstFieldMaskArg syncMode ,
329 const UInt32 uiSyncInfo);
331 void execSync ( ShaderShadowMapEngineDataBase *pFrom,
332 ConstFieldMaskArg whichField,
333 AspectOffsetStore &oOffsets,
334 ConstFieldMaskArg syncMode ,
335 const UInt32 uiSyncInfo);
336 #endif
338 /*! \} */
339 /*---------------------------------------------------------------------*/
340 /*! \name Edit */
341 /*! \{ */
343 /*! \} */
344 /*---------------------------------------------------------------------*/
345 /*! \name Aspect Create */
346 /*! \{ */
348 #ifdef OSG_MT_CPTR_ASPECT
349 virtual FieldContainer *createAspectCopy(
350 const FieldContainer *pRefAspect) const;
351 #endif
353 /*! \} */
354 /*---------------------------------------------------------------------*/
355 /*! \name Edit */
356 /*! \{ */
357 /*! \} */
358 /*---------------------------------------------------------------------*/
359 /*! \name Sync */
360 /*! \{ */
362 virtual void resolveLinks(void);
364 /*! \} */
365 /*========================== PRIVATE ================================*/
367 private:
368 /*---------------------------------------------------------------------*/
370 // prohibit default functions (move to 'public' if you need one)
371 void operator =(const ShaderShadowMapEngineDataBase &source);
374 typedef ShaderShadowMapEngineDataBase *ShaderShadowMapEngineDataBaseP;
376 OSG_END_NAMESPACE
378 #endif /* _OSGSHADERSHADOWMAPENGINEDATABASE_H_ */