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 **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGBACKGROUNDBASE_H_
55 #define _OSGBACKGROUNDBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGAttachmentContainer.h" // Parent
68 #include "OSGSysFields.h" // ClearStencilBit type
70 #include "OSGBackgroundFields.h"
77 //! \brief Background Base Class.
79 class OSG_SYSTEM_DLLMAPPING BackgroundBase
: public AttachmentContainer
83 typedef AttachmentContainer Inherited
;
84 typedef AttachmentContainer ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(Background
);
91 /*========================== PUBLIC =================================*/
97 ClearStencilBitFieldId
= Inherited::NextFieldId
,
98 DepthFieldId
= ClearStencilBitFieldId
+ 1,
99 ClearDepthFieldId
= DepthFieldId
+ 1,
100 ClearColorFieldId
= ClearDepthFieldId
+ 1,
101 NextFieldId
= ClearColorFieldId
+ 1
104 static const OSG::BitVector ClearStencilBitFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< ClearStencilBitFieldId
);
106 static const OSG::BitVector DepthFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< DepthFieldId
);
108 static const OSG::BitVector ClearDepthFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< ClearDepthFieldId
);
110 static const OSG::BitVector ClearColorFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< ClearColorFieldId
);
112 static const OSG::BitVector NextFieldMask
=
113 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
115 typedef SFInt32 SFClearStencilBitType
;
116 typedef SFReal32 SFDepthType
;
117 typedef SFBool SFClearDepthType
;
118 typedef SFBool SFClearColorType
;
120 /*---------------------------------------------------------------------*/
121 /*! \name Class Get */
124 static FieldContainerType
&getClassType (void);
125 static UInt32
getClassTypeId (void);
126 static UInt16
getClassGroupId(void);
129 /*---------------------------------------------------------------------*/
130 /*! \name FieldContainer Get */
133 virtual FieldContainerType
&getType (void);
134 virtual const FieldContainerType
&getType (void) const;
136 virtual UInt32
getContainerSize(void) const;
139 /*---------------------------------------------------------------------*/
140 /*! \name Field Get */
144 SFInt32
*editSFClearStencilBit(void);
145 const SFInt32
*getSFClearStencilBit (void) const;
147 SFReal32
*editSFDepth (void);
148 const SFReal32
*getSFDepth (void) const;
150 SFBool
*editSFClearDepth (void);
151 const SFBool
*getSFClearDepth (void) const;
153 SFBool
*editSFClearColor (void);
154 const SFBool
*getSFClearColor (void) const;
157 Int32
&editClearStencilBit(void);
158 Int32
getClearStencilBit (void) const;
160 Real32
&editDepth (void);
161 Real32
getDepth (void) const;
163 bool &editClearDepth (void);
164 bool getClearDepth (void) const;
166 bool &editClearColor (void);
167 bool getClearColor (void) const;
170 /*---------------------------------------------------------------------*/
171 /*! \name Field Set */
174 void setClearStencilBit(const Int32 value
);
175 void setDepth (const Real32 value
);
176 void setClearDepth (const bool value
);
177 void setClearColor (const bool value
);
180 /*---------------------------------------------------------------------*/
181 /*! \name Ptr MField Set */
185 /*---------------------------------------------------------------------*/
186 /*! \name Binary Access */
189 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
190 virtual void copyToBin (BinaryDataHandler
&pMem
,
191 ConstFieldMaskArg whichField
);
192 virtual void copyFromBin(BinaryDataHandler
&pMem
,
193 ConstFieldMaskArg whichField
);
197 /*========================= PROTECTED ===============================*/
201 static TypeObject _type
;
203 static void classDescInserter(TypeObject
&oType
);
204 static const Char8
*getClassname (void );
206 /*---------------------------------------------------------------------*/
210 SFInt32 _sfClearStencilBit
;
212 SFBool _sfClearDepth
;
213 SFBool _sfClearColor
;
216 /*---------------------------------------------------------------------*/
217 /*! \name Constructors */
220 BackgroundBase(void);
221 BackgroundBase(const BackgroundBase
&source
);
224 /*---------------------------------------------------------------------*/
225 /*! \name Destructors */
228 virtual ~BackgroundBase(void);
231 /*---------------------------------------------------------------------*/
232 /*! \name onCreate */
237 /*---------------------------------------------------------------------*/
238 /*! \name Generic Field Access */
241 GetFieldHandlePtr
getHandleClearStencilBit (void) const;
242 EditFieldHandlePtr
editHandleClearStencilBit(void);
243 GetFieldHandlePtr
getHandleDepth (void) const;
244 EditFieldHandlePtr
editHandleDepth (void);
245 GetFieldHandlePtr
getHandleClearDepth (void) const;
246 EditFieldHandlePtr
editHandleClearDepth (void);
247 GetFieldHandlePtr
getHandleClearColor (void) const;
248 EditFieldHandlePtr
editHandleClearColor (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 ( BackgroundBase
*pFrom
,
263 ConstFieldMaskArg whichField
,
264 AspectOffsetStore
&oOffsets
,
265 ConstFieldMaskArg syncMode
,
266 const UInt32 uiSyncInfo
);
270 /*---------------------------------------------------------------------*/
275 /*---------------------------------------------------------------------*/
276 /*! \name Aspect Create */
280 /*---------------------------------------------------------------------*/
284 /*---------------------------------------------------------------------*/
288 virtual void resolveLinks(void);
291 /*========================== PRIVATE ================================*/
294 /*---------------------------------------------------------------------*/
296 // prohibit default functions (move to 'public' if you need one)
297 void operator =(const BackgroundBase
&source
);
300 typedef BackgroundBase
*BackgroundBaseP
;
304 #endif /* _OSGBACKGROUNDBASE_H_ */