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 _OSGGEOPROPERTYBASE_H_
55 #define _OSGGEOPROPERTYBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGSystemDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGStateChunk.h" // Parent
68 #include "OSGSysFields.h" // UseVBO type
70 #include "OSGGeoPropertyFields.h"
77 //! \brief GeoProperty Base Class.
79 class OSG_SYSTEM_DLLMAPPING GeoPropertyBase
: public StateChunk
83 typedef StateChunk Inherited
;
84 typedef StateChunk ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(GeoProperty
);
91 /*========================== PUBLIC =================================*/
97 UseVBOFieldId
= Inherited::NextFieldId
,
98 UsageFieldId
= UseVBOFieldId
+ 1,
99 GLIdFieldId
= UsageFieldId
+ 1,
100 VboUsageFieldId
= GLIdFieldId
+ 1,
101 NextFieldId
= VboUsageFieldId
+ 1
104 static const OSG::BitVector UseVBOFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< UseVBOFieldId
);
106 static const OSG::BitVector UsageFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< UsageFieldId
);
108 static const OSG::BitVector GLIdFieldMask
=
109 (TypeTraits
<BitVector
>::One
<< GLIdFieldId
);
110 static const OSG::BitVector VboUsageFieldMask
=
111 (TypeTraits
<BitVector
>::One
<< VboUsageFieldId
);
112 static const OSG::BitVector NextFieldMask
=
113 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
115 typedef SFBool SFUseVBOType
;
116 typedef SFUInt32 SFUsageType
;
117 typedef SFUInt32 SFGLIdType
;
118 typedef SFInt32 SFVboUsageType
;
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 SFBool
*editSFUseVBO (void);
145 const SFBool
*getSFUseVBO (void) const;
147 SFUInt32
*editSFUsage (void);
148 const SFUInt32
*getSFUsage (void) const;
150 SFInt32
*editSFVboUsage (void);
151 const SFInt32
*getSFVboUsage (void) const;
154 bool &editUseVBO (void);
155 bool getUseVBO (void) const;
157 UInt32
&editUsage (void);
158 UInt32
getUsage (void) const;
160 Int32
&editVboUsage (void);
161 Int32
getVboUsage (void) const;
164 /*---------------------------------------------------------------------*/
165 /*! \name Field Set */
168 void setUseVBO (const bool value
);
169 void setUsage (const UInt32 value
);
170 void setVboUsage (const Int32 value
);
173 /*---------------------------------------------------------------------*/
174 /*! \name Ptr MField Set */
178 /*---------------------------------------------------------------------*/
179 /*! \name Binary Access */
182 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
183 virtual void copyToBin (BinaryDataHandler
&pMem
,
184 ConstFieldMaskArg whichField
);
185 virtual void copyFromBin(BinaryDataHandler
&pMem
,
186 ConstFieldMaskArg whichField
);
190 /*========================= PROTECTED ===============================*/
194 static TypeObject _type
;
196 static void classDescInserter(TypeObject
&oType
);
197 static const Char8
*getClassname (void );
199 /*---------------------------------------------------------------------*/
209 /*---------------------------------------------------------------------*/
210 /*! \name Constructors */
213 GeoPropertyBase(void);
214 GeoPropertyBase(const GeoPropertyBase
&source
);
217 /*---------------------------------------------------------------------*/
218 /*! \name Destructors */
221 virtual ~GeoPropertyBase(void);
224 /*---------------------------------------------------------------------*/
225 /*! \name onCreate */
230 /*---------------------------------------------------------------------*/
231 /*! \name Generic Field Access */
234 GetFieldHandlePtr
getHandleUseVBO (void) const;
235 EditFieldHandlePtr
editHandleUseVBO (void);
236 GetFieldHandlePtr
getHandleUsage (void) const;
237 EditFieldHandlePtr
editHandleUsage (void);
238 GetFieldHandlePtr
getHandleGLId (void) const;
239 EditFieldHandlePtr
editHandleGLId (void);
240 GetFieldHandlePtr
getHandleVboUsage (void) const;
241 EditFieldHandlePtr
editHandleVboUsage (void);
244 /*---------------------------------------------------------------------*/
245 /*! \name Field Get */
249 SFUInt32
*editSFGLId (void);
250 const SFUInt32
*getSFGLId (void) const;
253 UInt32
&editGLId (void);
254 UInt32
getGLId (void) const;
257 /*---------------------------------------------------------------------*/
258 /*! \name Field Set */
261 void setGLId (const UInt32 value
);
264 /*---------------------------------------------------------------------*/
265 /*! \name Ptr MField Set */
269 /*---------------------------------------------------------------------*/
273 #ifdef OSG_MT_CPTR_ASPECT
274 virtual void execSyncV( FieldContainer
&oFrom
,
275 ConstFieldMaskArg whichField
,
276 AspectOffsetStore
&oOffsets
,
277 ConstFieldMaskArg syncMode
,
278 const UInt32 uiSyncInfo
);
280 void execSync ( GeoPropertyBase
*pFrom
,
281 ConstFieldMaskArg whichField
,
282 AspectOffsetStore
&oOffsets
,
283 ConstFieldMaskArg syncMode
,
284 const UInt32 uiSyncInfo
);
288 /*---------------------------------------------------------------------*/
293 /*---------------------------------------------------------------------*/
294 /*! \name Aspect Create */
298 /*---------------------------------------------------------------------*/
302 /*---------------------------------------------------------------------*/
306 virtual void resolveLinks(void);
309 /*========================== PRIVATE ================================*/
312 /*---------------------------------------------------------------------*/
314 // prohibit default functions (move to 'public' if you need one)
315 void operator =(const GeoPropertyBase
&source
);
318 typedef GeoPropertyBase
*GeoPropertyBaseP
;
322 #endif /* _OSGGEOPROPERTYBASE_H_ */