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 VRMLInterpolator
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGVRMLINTERPOLATORBASE_H_
55 #define _OSGVRMLINTERPOLATORBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGDynamicsDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGNodeCore.h" // Parent
68 #include "OSGSysFields.h" // InValue type
70 #include "OSGVRMLInterpolatorFields.h"
75 class VRMLInterpolator
;
77 //! \brief VRMLInterpolator Base Class.
79 class OSG_DYNAMICS_DLLMAPPING VRMLInterpolatorBase
: public NodeCore
83 typedef NodeCore Inherited
;
84 typedef NodeCore ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(VRMLInterpolator
);
91 /*========================== PUBLIC =================================*/
97 InValueFieldId
= Inherited::NextFieldId
,
98 KeyFieldId
= InValueFieldId
+ 1,
99 ResortIndexFieldId
= KeyFieldId
+ 1,
100 NextFieldId
= ResortIndexFieldId
+ 1
103 static const OSG::BitVector InValueFieldMask
=
104 (TypeTraits
<BitVector
>::One
<< InValueFieldId
);
105 static const OSG::BitVector KeyFieldMask
=
106 (TypeTraits
<BitVector
>::One
<< KeyFieldId
);
107 static const OSG::BitVector ResortIndexFieldMask
=
108 (TypeTraits
<BitVector
>::One
<< ResortIndexFieldId
);
109 static const OSG::BitVector NextFieldMask
=
110 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
112 typedef SFReal32 SFInValueType
;
113 typedef MFReal32 MFKeyType
;
114 typedef MFUInt32 MFResortIndexType
;
116 /*---------------------------------------------------------------------*/
117 /*! \name Class Get */
120 static FieldContainerType
&getClassType (void);
121 static UInt32
getClassTypeId (void);
122 static UInt16
getClassGroupId(void);
125 /*---------------------------------------------------------------------*/
126 /*! \name FieldContainer Get */
129 virtual FieldContainerType
&getType (void);
130 virtual const FieldContainerType
&getType (void) const;
132 virtual UInt32
getContainerSize(void) const;
135 /*---------------------------------------------------------------------*/
136 /*! \name Field Get */
140 SFReal32
*editSFInValue (void);
141 const SFReal32
*getSFInValue (void) const;
143 MFReal32
*editMFKey (void);
144 const MFReal32
*getMFKey (void) const;
146 MFUInt32
*editMFResortIndex (void);
147 const MFUInt32
*getMFResortIndex (void) const;
150 Real32
&editInValue (void);
151 Real32
getInValue (void) const;
153 MFReal32 ::reference
editKey (const UInt32 index
);
154 Real32
getKey (const UInt32 index
) const;
156 MFUInt32 ::reference
editResortIndex (const UInt32 index
);
157 UInt32
getResortIndex (const UInt32 index
) const;
160 /*---------------------------------------------------------------------*/
161 /*! \name Field Set */
164 void setInValue (const Real32 value
);
167 /*---------------------------------------------------------------------*/
168 /*! \name Ptr MField Set */
172 /*---------------------------------------------------------------------*/
173 /*! \name Binary Access */
176 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
177 virtual void copyToBin (BinaryDataHandler
&pMem
,
178 ConstFieldMaskArg whichField
);
179 virtual void copyFromBin(BinaryDataHandler
&pMem
,
180 ConstFieldMaskArg whichField
);
184 /*---------------------------------------------------------------------*/
185 /*! \name Construction */
188 static VRMLInterpolatorTransitPtr
create (void);
189 static VRMLInterpolator
*createEmpty (void);
191 static VRMLInterpolatorTransitPtr
createLocal (
192 BitVector bFlags
= FCLocal::All
);
194 static VRMLInterpolator
*createEmptyLocal(
195 BitVector bFlags
= FCLocal::All
);
197 static VRMLInterpolatorTransitPtr
createDependent (BitVector bFlags
);
200 /*---------------------------------------------------------------------*/
204 virtual FieldContainerTransitPtr
shallowCopy (void) const;
205 virtual FieldContainerTransitPtr
shallowCopyLocal(
206 BitVector bFlags
= FCLocal::All
) const;
207 virtual FieldContainerTransitPtr
shallowCopyDependent(
208 BitVector bFlags
) const;
211 /*========================= PROTECTED ===============================*/
215 static TypeObject _type
;
217 static void classDescInserter(TypeObject
&oType
);
218 static const Char8
*getClassname (void );
220 /*---------------------------------------------------------------------*/
226 MFUInt32 _mfResortIndex
;
229 /*---------------------------------------------------------------------*/
230 /*! \name Constructors */
233 VRMLInterpolatorBase(void);
234 VRMLInterpolatorBase(const VRMLInterpolatorBase
&source
);
237 /*---------------------------------------------------------------------*/
238 /*! \name Destructors */
241 virtual ~VRMLInterpolatorBase(void);
244 /*---------------------------------------------------------------------*/
245 /*! \name onCreate */
250 /*---------------------------------------------------------------------*/
251 /*! \name Generic Field Access */
254 GetFieldHandlePtr
getHandleInValue (void) const;
255 EditFieldHandlePtr
editHandleInValue (void);
256 GetFieldHandlePtr
getHandleKey (void) const;
257 EditFieldHandlePtr
editHandleKey (void);
258 GetFieldHandlePtr
getHandleResortIndex (void) const;
259 EditFieldHandlePtr
editHandleResortIndex (void);
262 /*---------------------------------------------------------------------*/
266 #ifdef OSG_MT_CPTR_ASPECT
267 virtual void execSyncV( FieldContainer
&oFrom
,
268 ConstFieldMaskArg whichField
,
269 AspectOffsetStore
&oOffsets
,
270 ConstFieldMaskArg syncMode
,
271 const UInt32 uiSyncInfo
);
273 void execSync ( VRMLInterpolatorBase
*pFrom
,
274 ConstFieldMaskArg whichField
,
275 AspectOffsetStore
&oOffsets
,
276 ConstFieldMaskArg syncMode
,
277 const UInt32 uiSyncInfo
);
281 /*---------------------------------------------------------------------*/
286 /*---------------------------------------------------------------------*/
287 /*! \name Aspect Create */
290 #ifdef OSG_MT_CPTR_ASPECT
291 virtual FieldContainer
*createAspectCopy(
292 const FieldContainer
*pRefAspect
) const;
296 /*---------------------------------------------------------------------*/
300 /*---------------------------------------------------------------------*/
304 virtual void resolveLinks(void);
307 /*========================== PRIVATE ================================*/
310 /*---------------------------------------------------------------------*/
312 // prohibit default functions (move to 'public' if you need one)
313 void operator =(const VRMLInterpolatorBase
&source
);
316 typedef VRMLInterpolatorBase
*VRMLInterpolatorBaseP
;
318 typedef CoredNodeRefPtr
<VRMLInterpolator
> VRMLInterpolatorNodeRefPtr
;
319 typedef CoredNodeMTRefPtr
<VRMLInterpolator
> VRMLInterpolatorNodeMTRefPtr
;
323 #endif /* _OSGVRMLINTERPOLATORBASE_H_ */