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 TextureGrabBackground
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGTEXTUREGRABBACKGROUNDBASE_H_
55 #define _OSGTEXTUREGRABBACKGROUNDBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGWindowDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGSolidBackground.h" // Parent
68 #include "OSGTextureObjChunkFields.h" // Texture type
69 #include "OSGSysFields.h" // AutoResize type
70 #include "OSGBaseFields.h" // BindTarget type
72 #include "OSGTextureGrabBackgroundFields.h"
77 class TextureGrabBackground
;
79 //! \brief TextureGrabBackground Base Class.
81 class OSG_WINDOW_DLLMAPPING TextureGrabBackgroundBase
: public SolidBackground
85 typedef SolidBackground Inherited
;
86 typedef SolidBackground ParentContainer
;
88 typedef Inherited::TypeObject TypeObject
;
89 typedef TypeObject::InitPhase InitPhase
;
91 OSG_GEN_INTERNALPTR(TextureGrabBackground
);
93 /*========================== PUBLIC =================================*/
99 TextureFieldId
= Inherited::NextFieldId
,
100 AutoResizeFieldId
= TextureFieldId
+ 1,
101 BindTargetFieldId
= AutoResizeFieldId
+ 1,
102 CopyTargetFieldId
= BindTargetFieldId
+ 1,
103 NextFieldId
= CopyTargetFieldId
+ 1
106 static const OSG::BitVector TextureFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< TextureFieldId
);
108 static const OSG::BitVector AutoResizeFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< AutoResizeFieldId
);
110 static const OSG::BitVector BindTargetFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< BindTargetFieldId
);
112 static const OSG::BitVector CopyTargetFieldMask
=
113 (TypeTraits
<BitVector
>::One
<< CopyTargetFieldId
);
114 static const OSG::BitVector NextFieldMask
=
115 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
117 typedef SFUnrecTextureObjChunkPtr SFTextureType
;
118 typedef SFBool SFAutoResizeType
;
119 typedef SFGLenum SFBindTargetType
;
120 typedef SFGLenum SFCopyTargetType
;
122 /*---------------------------------------------------------------------*/
123 /*! \name Class Get */
126 static FieldContainerType
&getClassType (void);
127 static UInt32
getClassTypeId (void);
128 static UInt16
getClassGroupId(void);
131 /*---------------------------------------------------------------------*/
132 /*! \name FieldContainer Get */
135 virtual FieldContainerType
&getType (void);
136 virtual const FieldContainerType
&getType (void) const;
138 virtual UInt32
getContainerSize(void) const;
141 /*---------------------------------------------------------------------*/
142 /*! \name Field Get */
145 const SFUnrecTextureObjChunkPtr
*getSFTexture (void) const;
146 SFUnrecTextureObjChunkPtr
*editSFTexture (void);
148 SFBool
*editSFAutoResize (void);
149 const SFBool
*getSFAutoResize (void) const;
151 SFGLenum
*editSFBindTarget (void);
152 const SFGLenum
*getSFBindTarget (void) const;
154 SFGLenum
*editSFCopyTarget (void);
155 const SFGLenum
*getSFCopyTarget (void) const;
158 TextureObjChunk
* getTexture (void) const;
160 bool &editAutoResize (void);
161 bool getAutoResize (void) const;
163 GLenum
&editBindTarget (void);
164 const GLenum
&getBindTarget (void) const;
166 GLenum
&editCopyTarget (void);
167 const GLenum
&getCopyTarget (void) const;
170 /*---------------------------------------------------------------------*/
171 /*! \name Field Set */
174 void setTexture (TextureObjChunk
* const value
);
175 void setAutoResize (const bool value
);
176 void setBindTarget (const GLenum
&value
);
177 void setCopyTarget (const GLenum
&value
);
180 /*---------------------------------------------------------------------*/
181 /*! \name Ptr Field Set */
185 /*---------------------------------------------------------------------*/
186 /*! \name Ptr MField Set */
190 /*---------------------------------------------------------------------*/
191 /*! \name Binary Access */
194 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
195 virtual void copyToBin (BinaryDataHandler
&pMem
,
196 ConstFieldMaskArg whichField
);
197 virtual void copyFromBin(BinaryDataHandler
&pMem
,
198 ConstFieldMaskArg whichField
);
202 /*---------------------------------------------------------------------*/
203 /*! \name Construction */
206 static TextureGrabBackgroundTransitPtr
create (void);
207 static TextureGrabBackground
*createEmpty (void);
209 static TextureGrabBackgroundTransitPtr
createLocal (
210 BitVector bFlags
= FCLocal::All
);
212 static TextureGrabBackground
*createEmptyLocal(
213 BitVector bFlags
= FCLocal::All
);
215 static TextureGrabBackgroundTransitPtr
createDependent (BitVector bFlags
);
218 /*---------------------------------------------------------------------*/
222 virtual FieldContainerTransitPtr
shallowCopy (void) const;
223 virtual FieldContainerTransitPtr
shallowCopyLocal(
224 BitVector bFlags
= FCLocal::All
) const;
225 virtual FieldContainerTransitPtr
shallowCopyDependent(
226 BitVector bFlags
) const;
229 /*========================= PROTECTED ===============================*/
233 static TypeObject _type
;
235 static void classDescInserter(TypeObject
&oType
);
236 static const Char8
*getClassname (void );
238 /*---------------------------------------------------------------------*/
242 SFUnrecTextureObjChunkPtr _sfTexture
;
243 SFBool _sfAutoResize
;
244 SFGLenum _sfBindTarget
;
245 SFGLenum _sfCopyTarget
;
248 /*---------------------------------------------------------------------*/
249 /*! \name Constructors */
252 TextureGrabBackgroundBase(void);
253 TextureGrabBackgroundBase(const TextureGrabBackgroundBase
&source
);
256 /*---------------------------------------------------------------------*/
257 /*! \name Destructors */
260 virtual ~TextureGrabBackgroundBase(void);
263 /*---------------------------------------------------------------------*/
264 /*! \name onCreate */
267 void onCreate(const TextureGrabBackground
*source
= NULL
);
270 /*---------------------------------------------------------------------*/
271 /*! \name Generic Field Access */
274 GetFieldHandlePtr
getHandleTexture (void) const;
275 EditFieldHandlePtr
editHandleTexture (void);
276 GetFieldHandlePtr
getHandleAutoResize (void) const;
277 EditFieldHandlePtr
editHandleAutoResize (void);
278 GetFieldHandlePtr
getHandleBindTarget (void) const;
279 EditFieldHandlePtr
editHandleBindTarget (void);
280 GetFieldHandlePtr
getHandleCopyTarget (void) const;
281 EditFieldHandlePtr
editHandleCopyTarget (void);
284 /*---------------------------------------------------------------------*/
288 #ifdef OSG_MT_CPTR_ASPECT
289 virtual void execSyncV( FieldContainer
&oFrom
,
290 ConstFieldMaskArg whichField
,
291 AspectOffsetStore
&oOffsets
,
292 ConstFieldMaskArg syncMode
,
293 const UInt32 uiSyncInfo
);
295 void execSync ( TextureGrabBackgroundBase
*pFrom
,
296 ConstFieldMaskArg whichField
,
297 AspectOffsetStore
&oOffsets
,
298 ConstFieldMaskArg syncMode
,
299 const UInt32 uiSyncInfo
);
303 /*---------------------------------------------------------------------*/
308 /*---------------------------------------------------------------------*/
309 /*! \name Aspect Create */
312 #ifdef OSG_MT_CPTR_ASPECT
313 virtual FieldContainer
*createAspectCopy(
314 const FieldContainer
*pRefAspect
) const;
318 /*---------------------------------------------------------------------*/
322 /*---------------------------------------------------------------------*/
326 virtual void resolveLinks(void);
329 /*========================== PRIVATE ================================*/
332 /*---------------------------------------------------------------------*/
334 // prohibit default functions (move to 'public' if you need one)
335 void operator =(const TextureGrabBackgroundBase
&source
);
338 typedef TextureGrabBackgroundBase
*TextureGrabBackgroundBaseP
;
342 #endif /* _OSGTEXTUREGRABBACKGROUNDBASE_H_ */