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 _OSGDISTANCELODBASE_H_
55 #define _OSGDISTANCELODBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGGroupDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGGroup.h" // Parent
68 #include "OSGVecFields.h" // Center type
69 #include "OSGSysFields.h" // Range type
71 #include "OSGDistanceLODFields.h"
78 //! \brief DistanceLOD Base Class.
80 class OSG_GROUP_DLLMAPPING DistanceLODBase
: public Group
84 typedef Group Inherited
;
85 typedef Group ParentContainer
;
87 typedef Inherited::TypeObject TypeObject
;
88 typedef TypeObject::InitPhase InitPhase
;
90 OSG_GEN_INTERNALPTR(DistanceLOD
);
92 /*========================== PUBLIC =================================*/
98 CenterFieldId
= Inherited::NextFieldId
,
99 RangeFieldId
= CenterFieldId
+ 1,
100 NextFieldId
= RangeFieldId
+ 1
103 static const OSG::BitVector CenterFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< CenterFieldId
);
105 static const OSG::BitVector RangeFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< RangeFieldId
);
107 static const OSG::BitVector NextFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
110 typedef SFPnt3f SFCenterType
;
111 typedef MFReal32 MFRangeType
;
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 SFPnt3f
*editSFCenter (void);
138 const SFPnt3f
*getSFCenter (void) const;
140 MFReal32
*editMFRange (void);
141 const MFReal32
*getMFRange (void) const;
144 Pnt3f
&editCenter (void);
145 const Pnt3f
&getCenter (void) const;
147 MFReal32 ::reference
editRange (const UInt32 index
);
148 Real32
getRange (const UInt32 index
) const;
151 /*---------------------------------------------------------------------*/
152 /*! \name Field Set */
155 void setCenter (const Pnt3f
&value
);
158 /*---------------------------------------------------------------------*/
159 /*! \name Ptr MField Set */
163 /*---------------------------------------------------------------------*/
164 /*! \name Binary Access */
167 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
168 virtual void copyToBin (BinaryDataHandler
&pMem
,
169 ConstFieldMaskArg whichField
);
170 virtual void copyFromBin(BinaryDataHandler
&pMem
,
171 ConstFieldMaskArg whichField
);
175 /*---------------------------------------------------------------------*/
176 /*! \name Construction */
179 static DistanceLODTransitPtr
create (void);
180 static DistanceLOD
*createEmpty (void);
182 static DistanceLODTransitPtr
createLocal (
183 BitVector bFlags
= FCLocal::All
);
185 static DistanceLOD
*createEmptyLocal(
186 BitVector bFlags
= FCLocal::All
);
188 static DistanceLODTransitPtr
createDependent (BitVector bFlags
);
191 /*---------------------------------------------------------------------*/
195 virtual FieldContainerTransitPtr
shallowCopy (void) const;
196 virtual FieldContainerTransitPtr
shallowCopyLocal(
197 BitVector bFlags
= FCLocal::All
) const;
198 virtual FieldContainerTransitPtr
shallowCopyDependent(
199 BitVector bFlags
) const;
202 /*========================= PROTECTED ===============================*/
206 static TypeObject _type
;
208 static void classDescInserter(TypeObject
&oType
);
209 static const Char8
*getClassname (void );
211 /*---------------------------------------------------------------------*/
219 /*---------------------------------------------------------------------*/
220 /*! \name Constructors */
223 DistanceLODBase(void);
224 DistanceLODBase(const DistanceLODBase
&source
);
227 /*---------------------------------------------------------------------*/
228 /*! \name Destructors */
231 virtual ~DistanceLODBase(void);
234 /*---------------------------------------------------------------------*/
235 /*! \name onCreate */
240 /*---------------------------------------------------------------------*/
241 /*! \name Generic Field Access */
244 GetFieldHandlePtr
getHandleCenter (void) const;
245 EditFieldHandlePtr
editHandleCenter (void);
246 GetFieldHandlePtr
getHandleRange (void) const;
247 EditFieldHandlePtr
editHandleRange (void);
250 /*---------------------------------------------------------------------*/
254 #ifdef OSG_MT_CPTR_ASPECT
255 virtual void execSyncV( FieldContainer
&oFrom
,
256 ConstFieldMaskArg whichField
,
257 AspectOffsetStore
&oOffsets
,
258 ConstFieldMaskArg syncMode
,
259 const UInt32 uiSyncInfo
);
261 void execSync ( DistanceLODBase
*pFrom
,
262 ConstFieldMaskArg whichField
,
263 AspectOffsetStore
&oOffsets
,
264 ConstFieldMaskArg syncMode
,
265 const UInt32 uiSyncInfo
);
269 /*---------------------------------------------------------------------*/
274 /*---------------------------------------------------------------------*/
275 /*! \name Aspect Create */
278 #ifdef OSG_MT_CPTR_ASPECT
279 virtual FieldContainer
*createAspectCopy(
280 const FieldContainer
*pRefAspect
) const;
284 /*---------------------------------------------------------------------*/
288 /*---------------------------------------------------------------------*/
292 virtual void resolveLinks(void);
295 /*========================== PRIVATE ================================*/
298 /*---------------------------------------------------------------------*/
300 // prohibit default functions (move to 'public' if you need one)
301 void operator =(const DistanceLODBase
&source
);
304 typedef DistanceLODBase
*DistanceLODBaseP
;
306 typedef CoredNodeRefPtr
<DistanceLOD
> DistanceLODNodeRefPtr
;
307 typedef CoredNodeMTRefPtr
<DistanceLOD
> DistanceLODNodeMTRefPtr
;
311 #endif /* _OSGDISTANCELODBASE_H_ */