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 DynamicStateGenerator
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGDYNAMICSTATEGENERATORBASE_H_
55 #define _OSGDYNAMICSTATEGENERATORBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGChunkOverrideGroup.h" // Parent
68 #include "OSGFrameBufferObjectFields.h" // RenderTarget type
70 #include "OSGDynamicStateGeneratorFields.h"
72 #include "OSGDynamicStateGeneratorParent.h"
77 class DynamicStateGenerator
;
79 //! \brief DynamicStateGenerator Base Class.
81 class OSG_GROUP_DLLMAPPING DynamicStateGeneratorBase
: public DynamicStateGeneratorParent
85 typedef DynamicStateGeneratorParent Inherited
;
86 typedef ChunkOverrideGroup ParentContainer
;
88 typedef Inherited::TypeObject TypeObject
;
89 typedef TypeObject::InitPhase InitPhase
;
91 OSG_GEN_INTERNALPTR(DynamicStateGenerator
);
93 /*========================== PUBLIC =================================*/
99 RenderTargetFieldId
= Inherited::NextFieldId
,
100 NextFieldId
= RenderTargetFieldId
+ 1
103 static const OSG::BitVector RenderTargetFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< RenderTargetFieldId
);
105 static const OSG::BitVector NextFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
108 typedef SFUnrecFrameBufferObjectPtr SFRenderTargetType
;
110 /*---------------------------------------------------------------------*/
111 /*! \name Class Get */
114 static FieldContainerType
&getClassType (void);
115 static UInt32
getClassTypeId (void);
116 static UInt16
getClassGroupId(void);
119 /*---------------------------------------------------------------------*/
120 /*! \name FieldContainer Get */
123 virtual FieldContainerType
&getType (void);
124 virtual const FieldContainerType
&getType (void) const;
126 virtual UInt32
getContainerSize(void) const;
129 /*---------------------------------------------------------------------*/
130 /*! \name Binary Access */
133 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
134 virtual void copyToBin (BinaryDataHandler
&pMem
,
135 ConstFieldMaskArg whichField
);
136 virtual void copyFromBin(BinaryDataHandler
&pMem
,
137 ConstFieldMaskArg whichField
);
141 /*---------------------------------------------------------------------*/
142 /*! \name Construction */
145 static DynamicStateGeneratorTransitPtr
create (void);
146 static DynamicStateGenerator
*createEmpty (void);
148 static DynamicStateGeneratorTransitPtr
createLocal (
149 BitVector bFlags
= FCLocal::All
);
151 static DynamicStateGenerator
*createEmptyLocal(
152 BitVector bFlags
= FCLocal::All
);
154 static DynamicStateGeneratorTransitPtr
createDependent (BitVector bFlags
);
157 /*---------------------------------------------------------------------*/
161 virtual FieldContainerTransitPtr
shallowCopy (void) const;
162 virtual FieldContainerTransitPtr
shallowCopyLocal(
163 BitVector bFlags
= FCLocal::All
) const;
164 virtual FieldContainerTransitPtr
shallowCopyDependent(
165 BitVector bFlags
) const;
168 /*========================= PROTECTED ===============================*/
172 static TypeObject _type
;
174 static void classDescInserter(TypeObject
&oType
);
175 static const Char8
*getClassname (void );
177 /*---------------------------------------------------------------------*/
181 SFUnrecFrameBufferObjectPtr _sfRenderTarget
;
184 /*---------------------------------------------------------------------*/
185 /*! \name Constructors */
188 DynamicStateGeneratorBase(void);
189 DynamicStateGeneratorBase(const DynamicStateGeneratorBase
&source
);
192 /*---------------------------------------------------------------------*/
193 /*! \name Destructors */
196 virtual ~DynamicStateGeneratorBase(void);
199 /*---------------------------------------------------------------------*/
200 /*! \name onCreate */
203 void onCreate(const DynamicStateGenerator
*source
= NULL
);
206 /*---------------------------------------------------------------------*/
207 /*! \name Generic Field Access */
210 GetFieldHandlePtr
getHandleRenderTarget (void) const;
211 EditFieldHandlePtr
editHandleRenderTarget (void);
214 /*---------------------------------------------------------------------*/
215 /*! \name Field Get */
218 const SFUnrecFrameBufferObjectPtr
*getSFRenderTarget (void) const;
219 SFUnrecFrameBufferObjectPtr
*editSFRenderTarget (void);
222 FrameBufferObject
* getRenderTarget (void) const;
225 /*---------------------------------------------------------------------*/
226 /*! \name Field Set */
229 void setRenderTarget (FrameBufferObject
* const value
);
232 /*---------------------------------------------------------------------*/
233 /*! \name Ptr MField Set */
237 /*---------------------------------------------------------------------*/
241 #ifdef OSG_MT_CPTR_ASPECT
242 virtual void execSyncV( FieldContainer
&oFrom
,
243 ConstFieldMaskArg whichField
,
244 AspectOffsetStore
&oOffsets
,
245 ConstFieldMaskArg syncMode
,
246 const UInt32 uiSyncInfo
);
248 void execSync ( DynamicStateGeneratorBase
*pFrom
,
249 ConstFieldMaskArg whichField
,
250 AspectOffsetStore
&oOffsets
,
251 ConstFieldMaskArg syncMode
,
252 const UInt32 uiSyncInfo
);
256 /*---------------------------------------------------------------------*/
261 /*---------------------------------------------------------------------*/
262 /*! \name Aspect Create */
265 #ifdef OSG_MT_CPTR_ASPECT
266 virtual FieldContainer
*createAspectCopy(
267 const FieldContainer
*pRefAspect
) const;
271 /*---------------------------------------------------------------------*/
275 /*---------------------------------------------------------------------*/
279 virtual void resolveLinks(void);
282 /*========================== PRIVATE ================================*/
285 /*---------------------------------------------------------------------*/
287 // prohibit default functions (move to 'public' if you need one)
288 void operator =(const DynamicStateGeneratorBase
&source
);
291 typedef DynamicStateGeneratorBase
*DynamicStateGeneratorBaseP
;
293 typedef CoredNodeRefPtr
<DynamicStateGenerator
> DynamicStateGeneratorNodeRefPtr
;
294 typedef CoredNodeMTRefPtr
<DynamicStateGenerator
> DynamicStateGeneratorNodeMTRefPtr
;
298 #endif /* _OSGDYNAMICSTATEGENERATORBASE_H_ */