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 VRMLNormalInterpolator
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGVRMLNORMALINTERPOLATORBASE_H_
55 #define _OSGVRMLNORMALINTERPOLATORBASE_H_
61 #include "OSGConfig.h"
62 #include "OSGDynamicsDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGVRMLInterpolator.h" // Parent
68 #include "OSGVecFields.h" // KeyValue type
70 #include "OSGVRMLNormalInterpolatorFields.h"
75 class VRMLNormalInterpolator
;
77 //! \brief VRMLNormalInterpolator Base Class.
79 class OSG_DYNAMICS_DLLMAPPING VRMLNormalInterpolatorBase
: public VRMLInterpolator
83 typedef VRMLInterpolator Inherited
;
84 typedef VRMLInterpolator ParentContainer
;
86 typedef Inherited::TypeObject TypeObject
;
87 typedef TypeObject::InitPhase InitPhase
;
89 OSG_GEN_INTERNALPTR(VRMLNormalInterpolator
);
91 /*========================== PUBLIC =================================*/
97 KeyValueFieldId
= Inherited::NextFieldId
,
98 OutValueFieldId
= KeyValueFieldId
+ 1,
99 NextFieldId
= OutValueFieldId
+ 1
102 static const OSG::BitVector KeyValueFieldMask
=
103 (TypeTraits
<BitVector
>::One
<< KeyValueFieldId
);
104 static const OSG::BitVector OutValueFieldMask
=
105 (TypeTraits
<BitVector
>::One
<< OutValueFieldId
);
106 static const OSG::BitVector NextFieldMask
=
107 (TypeTraits
<BitVector
>::One
<< NextFieldId
);
109 typedef MFVec3f MFKeyValueType
;
110 typedef MFVec3f MFOutValueType
;
112 /*---------------------------------------------------------------------*/
113 /*! \name Class Get */
116 static FieldContainerType
&getClassType (void);
117 static UInt32
getClassTypeId (void);
118 static UInt16
getClassGroupId(void);
121 /*---------------------------------------------------------------------*/
122 /*! \name FieldContainer Get */
125 virtual FieldContainerType
&getType (void);
126 virtual const FieldContainerType
&getType (void) const;
128 virtual UInt32
getContainerSize(void) const;
131 /*---------------------------------------------------------------------*/
132 /*! \name Field Get */
136 MFVec3f
*editMFKeyValue (void);
137 const MFVec3f
*getMFKeyValue (void) const;
139 MFVec3f
*editMFOutValue (void);
140 const MFVec3f
*getMFOutValue (void) const;
143 MFVec3f ::reference
editKeyValue (const UInt32 index
);
144 const Vec3f
&getKeyValue (const UInt32 index
) const;
146 MFVec3f ::reference
editOutValue (const UInt32 index
);
147 const Vec3f
&getOutValue (const UInt32 index
) const;
150 /*---------------------------------------------------------------------*/
151 /*! \name Field Set */
156 /*---------------------------------------------------------------------*/
157 /*! \name Ptr MField Set */
161 /*---------------------------------------------------------------------*/
162 /*! \name Binary Access */
165 virtual SizeT
getBinSize (ConstFieldMaskArg whichField
);
166 virtual void copyToBin (BinaryDataHandler
&pMem
,
167 ConstFieldMaskArg whichField
);
168 virtual void copyFromBin(BinaryDataHandler
&pMem
,
169 ConstFieldMaskArg whichField
);
173 /*---------------------------------------------------------------------*/
174 /*! \name Construction */
177 static VRMLNormalInterpolatorTransitPtr
create (void);
178 static VRMLNormalInterpolator
*createEmpty (void);
180 static VRMLNormalInterpolatorTransitPtr
createLocal (
181 BitVector bFlags
= FCLocal::All
);
183 static VRMLNormalInterpolator
*createEmptyLocal(
184 BitVector bFlags
= FCLocal::All
);
186 static VRMLNormalInterpolatorTransitPtr
createDependent (BitVector bFlags
);
189 /*---------------------------------------------------------------------*/
193 virtual FieldContainerTransitPtr
shallowCopy (void) const;
194 virtual FieldContainerTransitPtr
shallowCopyLocal(
195 BitVector bFlags
= FCLocal::All
) const;
196 virtual FieldContainerTransitPtr
shallowCopyDependent(
197 BitVector bFlags
) const;
200 /*========================= PROTECTED ===============================*/
204 static TypeObject _type
;
206 static void classDescInserter(TypeObject
&oType
);
207 static const Char8
*getClassname (void );
209 /*---------------------------------------------------------------------*/
217 /*---------------------------------------------------------------------*/
218 /*! \name Constructors */
221 VRMLNormalInterpolatorBase(void);
222 VRMLNormalInterpolatorBase(const VRMLNormalInterpolatorBase
&source
);
225 /*---------------------------------------------------------------------*/
226 /*! \name Destructors */
229 virtual ~VRMLNormalInterpolatorBase(void);
232 /*---------------------------------------------------------------------*/
233 /*! \name onCreate */
238 /*---------------------------------------------------------------------*/
239 /*! \name Generic Field Access */
242 GetFieldHandlePtr
getHandleKeyValue (void) const;
243 EditFieldHandlePtr
editHandleKeyValue (void);
244 GetFieldHandlePtr
getHandleOutValue (void) const;
245 EditFieldHandlePtr
editHandleOutValue (void);
248 /*---------------------------------------------------------------------*/
252 #ifdef OSG_MT_CPTR_ASPECT
253 virtual void execSyncV( FieldContainer
&oFrom
,
254 ConstFieldMaskArg whichField
,
255 AspectOffsetStore
&oOffsets
,
256 ConstFieldMaskArg syncMode
,
257 const UInt32 uiSyncInfo
);
259 void execSync ( VRMLNormalInterpolatorBase
*pFrom
,
260 ConstFieldMaskArg whichField
,
261 AspectOffsetStore
&oOffsets
,
262 ConstFieldMaskArg syncMode
,
263 const UInt32 uiSyncInfo
);
267 /*---------------------------------------------------------------------*/
272 /*---------------------------------------------------------------------*/
273 /*! \name Aspect Create */
276 #ifdef OSG_MT_CPTR_ASPECT
277 virtual FieldContainer
*createAspectCopy(
278 const FieldContainer
*pRefAspect
) const;
282 /*---------------------------------------------------------------------*/
286 /*---------------------------------------------------------------------*/
290 virtual void resolveLinks(void);
293 /*========================== PRIVATE ================================*/
296 /*---------------------------------------------------------------------*/
298 // prohibit default functions (move to 'public' if you need one)
299 void operator =(const VRMLNormalInterpolatorBase
&source
);
302 typedef VRMLNormalInterpolatorBase
*VRMLNormalInterpolatorBaseP
;
304 typedef CoredNodeRefPtr
<VRMLNormalInterpolator
> VRMLNormalInterpolatorNodeRefPtr
;
305 typedef CoredNodeMTRefPtr
<VRMLNormalInterpolator
> VRMLNormalInterpolatorNodeMTRefPtr
;
309 #endif /* _OSGVRMLNORMALINTERPOLATORBASE_H_ */