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 SimpleShadowMapEngine
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSIMPLESHADOWMAPENGINEBASE_H_
55 #define _OSGSIMPLESHADOWMAPENGINEBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGShadowMapEngine.h" // Parent
68 #include "OSGBaseFields.h" // ShadowColor type
69 #include "OSGSysFields.h" // ForceTextureUnit type
71 #include "OSGSimpleShadowMapEngineFields.h"
76 class SimpleShadowMapEngine
;
78 //! \brief SimpleShadowMapEngine Base Class.
80 class OSG_GROUP_DLLMAPPING SimpleShadowMapEngineBase
: public ShadowMapEngine
84 typedef ShadowMapEngine Inherited
;
85 typedef ShadowMapEngine ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(SimpleShadowMapEngine
);
92 /*========================== PUBLIC =================================*/
98 ShadowColorFieldId
= Inherited::NextFieldId
,
99 ForceTextureUnitFieldId
= ShadowColorFieldId
+ 1,
100 NextFieldId
= ForceTextureUnitFieldId
+ 1
103 static const OSG::BitVector ShadowColorFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< ShadowColorFieldId
);
105 static const OSG::BitVector ForceTextureUnitFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< ForceTextureUnitFieldId
);
107 static const OSG::BitVector NextFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
110 typedef SFColor4f SFShadowColorType
;
111 typedef SFInt32 SFForceTextureUnitType
;
113 /*---------------------------------------------------------------------*/
114 /*! \name Class Get */
117 static FieldContainerType
&getClassType (void);
118 static UInt32
getClassTypeId (void);
119 static UInt16
getClassGroupId(void);
122 /*---------------------------------------------------------------------*/
123 /*! \name FieldContainer Get */
126 virtual FieldContainerType
&getType (void);
127 virtual const FieldContainerType
&getType (void) const;
129 virtual UInt32
getContainerSize(void) const;
132 /*---------------------------------------------------------------------*/
133 /*! \name Field Get */
137 SFColor4f
*editSFShadowColor (void);
138 const SFColor4f
*getSFShadowColor (void) const;
140 SFInt32
*editSFForceTextureUnit(void);
141 const SFInt32
*getSFForceTextureUnit (void) const;
144 Color4f
&editShadowColor (void);
145 const Color4f
&getShadowColor (void) const;
147 Int32
&editForceTextureUnit(void);
148 Int32
getForceTextureUnit (void) const;
151 /*---------------------------------------------------------------------*/
152 /*! \name Field Set */
155 void setShadowColor (const Color4f
&value
);
156 void setForceTextureUnit(const Int32 value
);
159 /*---------------------------------------------------------------------*/
160 /*! \name Ptr MField Set */
164 /*---------------------------------------------------------------------*/
165 /*! \name Binary Access */
168 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
169 virtual void copyToBin (BinaryDataHandler
&pMem
,
170 ConstFieldMaskArg whichField
);
171 virtual void copyFromBin(BinaryDataHandler
&pMem
,
172 ConstFieldMaskArg whichField
);
176 /*---------------------------------------------------------------------*/
177 /*! \name Construction */
180 static SimpleShadowMapEngineTransitPtr
create (void);
181 static SimpleShadowMapEngine
*createEmpty (void);
183 static SimpleShadowMapEngineTransitPtr
createLocal (
184 BitVector bFlags
= FCLocal::All
);
186 static SimpleShadowMapEngine
*createEmptyLocal(
187 BitVector bFlags
= FCLocal::All
);
189 static SimpleShadowMapEngineTransitPtr
createDependent (BitVector bFlags
);
192 /*---------------------------------------------------------------------*/
196 virtual FieldContainerTransitPtr
shallowCopy (void) const;
197 virtual FieldContainerTransitPtr
shallowCopyLocal(
198 BitVector bFlags
= FCLocal::All
) const;
199 virtual FieldContainerTransitPtr
shallowCopyDependent(
200 BitVector bFlags
) const;
203 /*========================= PROTECTED ===============================*/
207 static TypeObject _type
;
209 static void classDescInserter(TypeObject
&oType
);
210 static const Char8
*getClassname (void );
212 /*---------------------------------------------------------------------*/
216 SFColor4f _sfShadowColor
;
217 SFInt32 _sfForceTextureUnit
;
220 /*---------------------------------------------------------------------*/
221 /*! \name Constructors */
224 SimpleShadowMapEngineBase(void);
225 SimpleShadowMapEngineBase(const SimpleShadowMapEngineBase
&source
);
228 /*---------------------------------------------------------------------*/
229 /*! \name Destructors */
232 virtual ~SimpleShadowMapEngineBase(void);
235 /*---------------------------------------------------------------------*/
236 /*! \name onCreate */
241 /*---------------------------------------------------------------------*/
242 /*! \name Generic Field Access */
245 GetFieldHandlePtr
getHandleShadowColor (void) const;
246 EditFieldHandlePtr
editHandleShadowColor (void);
247 GetFieldHandlePtr
getHandleForceTextureUnit (void) const;
248 EditFieldHandlePtr
editHandleForceTextureUnit(void);
251 /*---------------------------------------------------------------------*/
255 #ifdef OSG_MT_CPTR_ASPECT
256 virtual void execSyncV( FieldContainer
&oFrom
,
257 ConstFieldMaskArg whichField
,
258 AspectOffsetStore
&oOffsets
,
259 ConstFieldMaskArg syncMode
,
260 const UInt32 uiSyncInfo
);
262 void execSync ( SimpleShadowMapEngineBase
*pFrom
,
263 ConstFieldMaskArg whichField
,
264 AspectOffsetStore
&oOffsets
,
265 ConstFieldMaskArg syncMode
,
266 const UInt32 uiSyncInfo
);
270 /*---------------------------------------------------------------------*/
275 /*---------------------------------------------------------------------*/
276 /*! \name Aspect Create */
279 #ifdef OSG_MT_CPTR_ASPECT
280 virtual FieldContainer
*createAspectCopy(
281 const FieldContainer
*pRefAspect
) const;
285 /*---------------------------------------------------------------------*/
289 /*---------------------------------------------------------------------*/
293 virtual void resolveLinks(void);
296 /*========================== PRIVATE ================================*/
299 /*---------------------------------------------------------------------*/
301 // prohibit default functions (move to 'public' if you need one)
302 void operator =(const SimpleShadowMapEngineBase
&source
);
305 typedef SimpleShadowMapEngineBase
*SimpleShadowMapEngineBaseP
;
309 #endif /* _OSGSIMPLESHADOWMAPENGINEBASE_H_ */