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 PassiveBackground
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGPASSIVEBACKGROUNDBASE_H_
55 #define _OSGPASSIVEBACKGROUNDBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGWindowDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGBackground.h" // Parent
68 #include "OSGSysFields.h" // ClearFrameBufferObject type
69 #include "OSGRenderFunctorCallbackFields.h" // ClearCallback type
71 #include "OSGPassiveBackgroundFields.h"
76 class PassiveBackground
;
78 //! \brief PassiveBackground Base Class.
80 class OSG_WINDOW_DLLMAPPING PassiveBackgroundBase
: public Background
84 typedef Background Inherited
;
85 typedef Background ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(PassiveBackground
);
92 /*========================== PUBLIC =================================*/
98 ClearFrameBufferObjectFieldId
= Inherited::NextFieldId
,
99 ClearCallbackFieldId
= ClearFrameBufferObjectFieldId
+ 1,
100 NextFieldId
= ClearCallbackFieldId
+ 1
103 static const OSG::BitVector ClearFrameBufferObjectFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< ClearFrameBufferObjectFieldId
);
105 static const OSG::BitVector ClearCallbackFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< ClearCallbackFieldId
);
107 static const OSG::BitVector NextFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
110 typedef SFBool SFClearFrameBufferObjectType
;
111 typedef SFRenderFunctorCallback SFClearCallbackType
;
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 SFBool
*editSFClearFrameBufferObject(void);
138 const SFBool
*getSFClearFrameBufferObject (void) const;
141 bool &editClearFrameBufferObject(void);
142 bool getClearFrameBufferObject (void) const;
145 /*---------------------------------------------------------------------*/
146 /*! \name Field Set */
149 void setClearFrameBufferObject(const bool value
);
152 /*---------------------------------------------------------------------*/
153 /*! \name Ptr MField Set */
157 /*---------------------------------------------------------------------*/
158 /*! \name Binary Access */
161 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
162 virtual void copyToBin (BinaryDataHandler
&pMem
,
163 ConstFieldMaskArg whichField
);
164 virtual void copyFromBin(BinaryDataHandler
&pMem
,
165 ConstFieldMaskArg whichField
);
169 /*---------------------------------------------------------------------*/
170 /*! \name Construction */
173 static PassiveBackgroundTransitPtr
create (void);
174 static PassiveBackground
*createEmpty (void);
176 static PassiveBackgroundTransitPtr
createLocal (
177 BitVector bFlags
= FCLocal::All
);
179 static PassiveBackground
*createEmptyLocal(
180 BitVector bFlags
= FCLocal::All
);
182 static PassiveBackgroundTransitPtr
createDependent (BitVector bFlags
);
185 /*---------------------------------------------------------------------*/
189 virtual FieldContainerTransitPtr
shallowCopy (void) const;
190 virtual FieldContainerTransitPtr
shallowCopyLocal(
191 BitVector bFlags
= FCLocal::All
) const;
192 virtual FieldContainerTransitPtr
shallowCopyDependent(
193 BitVector bFlags
) const;
196 /*========================= PROTECTED ===============================*/
200 static TypeObject _type
;
202 static void classDescInserter(TypeObject
&oType
);
203 static const Char8
*getClassname (void );
205 /*---------------------------------------------------------------------*/
209 SFBool _sfClearFrameBufferObject
;
210 SFRenderFunctorCallback _sfClearCallback
;
213 /*---------------------------------------------------------------------*/
214 /*! \name Constructors */
217 PassiveBackgroundBase(void);
218 PassiveBackgroundBase(const PassiveBackgroundBase
&source
);
221 /*---------------------------------------------------------------------*/
222 /*! \name Destructors */
225 virtual ~PassiveBackgroundBase(void);
228 /*---------------------------------------------------------------------*/
229 /*! \name onCreate */
234 /*---------------------------------------------------------------------*/
235 /*! \name Generic Field Access */
238 GetFieldHandlePtr
getHandleClearFrameBufferObject (void) const;
239 EditFieldHandlePtr
editHandleClearFrameBufferObject(void);
240 GetFieldHandlePtr
getHandleClearCallback (void) const;
241 EditFieldHandlePtr
editHandleClearCallback (void);
244 /*---------------------------------------------------------------------*/
248 #ifdef OSG_MT_CPTR_ASPECT
249 virtual void execSyncV( FieldContainer
&oFrom
,
250 ConstFieldMaskArg whichField
,
251 AspectOffsetStore
&oOffsets
,
252 ConstFieldMaskArg syncMode
,
253 const UInt32 uiSyncInfo
);
255 void execSync ( PassiveBackgroundBase
*pFrom
,
256 ConstFieldMaskArg whichField
,
257 AspectOffsetStore
&oOffsets
,
258 ConstFieldMaskArg syncMode
,
259 const UInt32 uiSyncInfo
);
263 /*---------------------------------------------------------------------*/
268 /*---------------------------------------------------------------------*/
269 /*! \name Aspect Create */
272 #ifdef OSG_MT_CPTR_ASPECT
273 virtual FieldContainer
*createAspectCopy(
274 const FieldContainer
*pRefAspect
) const;
278 /*---------------------------------------------------------------------*/
282 /*---------------------------------------------------------------------*/
286 virtual void resolveLinks(void);
289 /*========================== PRIVATE ================================*/
292 /*---------------------------------------------------------------------*/
294 // prohibit default functions (move to 'public' if you need one)
295 void operator =(const PassiveBackgroundBase
&source
);
298 typedef PassiveBackgroundBase
*PassiveBackgroundBaseP
;
302 #endif /* _OSGPASSIVEBACKGROUNDBASE_H_ */