fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / Dynamics / Skeleton / OSGSkinningAlgorithmBase.h
blob9ae02581e2fa79ef64633c3151260c053d6c83d8
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class SkinningAlgorithm
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGSKINNINGALGORITHMBASE_H_
55 #define _OSGSKINNINGALGORITHMBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGDynamicsDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGAlgorithm.h" // Parent
68 #include "OSGSkinnedGeometryFields.h" // Skin type
69 #include "OSGSkeletonFields.h" // Skeleton type
71 #include "OSGSkinningAlgorithmFields.h"
73 OSG_BEGIN_NAMESPACE
76 class SkinningAlgorithm;
78 //! \brief SkinningAlgorithm Base Class.
80 class OSG_DYNAMICS_DLLMAPPING SkinningAlgorithmBase : public Algorithm
82 public:
84 typedef Algorithm Inherited;
85 typedef Algorithm ParentContainer;
87 typedef Inherited::TypeObject TypeObject;
88 typedef TypeObject::InitPhase InitPhase;
90 OSG_GEN_INTERNALPTR(SkinningAlgorithm);
92 /*========================== PUBLIC =================================*/
94 public:
96 enum
98 SkinFieldId = Inherited::NextFieldId,
99 SkeletonFieldId = SkinFieldId + 1,
100 NextFieldId = SkeletonFieldId + 1
103 static const OSG::BitVector SkinFieldMask =
104 (TypeTraits<BitVector>::One << SkinFieldId);
105 static const OSG::BitVector SkeletonFieldMask =
106 (TypeTraits<BitVector>::One << SkeletonFieldId);
107 static const OSG::BitVector NextFieldMask =
108 (TypeTraits<BitVector>::One << NextFieldId);
110 typedef SFParentSkinnedGeometryPtr SFSkinType;
111 typedef SFUnrecSkeletonPtr SFSkeletonType;
113 /*---------------------------------------------------------------------*/
114 /*! \name Class Get */
115 /*! \{ */
117 static FieldContainerType &getClassType (void);
118 static UInt32 getClassTypeId (void);
119 static UInt16 getClassGroupId(void);
121 /*! \} */
122 /*---------------------------------------------------------------------*/
123 /*! \name FieldContainer Get */
124 /*! \{ */
126 virtual FieldContainerType &getType (void);
127 virtual const FieldContainerType &getType (void) const;
129 virtual UInt32 getContainerSize(void) const;
131 /*! \} */
132 /*---------------------------------------------------------------------*/
133 /*! \name Field Get */
134 /*! \{ */
136 const SFUnrecSkeletonPtr *getSFSkeleton (void) const;
137 SFUnrecSkeletonPtr *editSFSkeleton (void);
140 Skeleton * getSkeleton (void) const;
142 /*! \} */
143 /*---------------------------------------------------------------------*/
144 /*! \name Field Set */
145 /*! \{ */
147 void setSkeleton (Skeleton * const value);
149 /*! \} */
150 /*---------------------------------------------------------------------*/
151 /*! \name Ptr Field Set */
152 /*! \{ */
154 /*! \} */
155 /*---------------------------------------------------------------------*/
156 /*! \name Ptr MField Set */
157 /*! \{ */
159 /*! \} */
160 /*---------------------------------------------------------------------*/
161 /*! \name Binary Access */
162 /*! \{ */
164 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
165 virtual void copyToBin (BinaryDataHandler &pMem,
166 ConstFieldMaskArg whichField);
167 virtual void copyFromBin(BinaryDataHandler &pMem,
168 ConstFieldMaskArg whichField);
171 /*! \} */
172 /*========================= PROTECTED ===============================*/
174 protected:
176 static TypeObject _type;
178 static void classDescInserter(TypeObject &oType);
179 static const Char8 *getClassname (void );
181 /*---------------------------------------------------------------------*/
182 /*! \name Fields */
183 /*! \{ */
185 SFParentSkinnedGeometryPtr _sfSkin;
186 SFUnrecSkeletonPtr _sfSkeleton;
188 /*! \} */
189 /*---------------------------------------------------------------------*/
190 /*! \name Constructors */
191 /*! \{ */
193 SkinningAlgorithmBase(void);
194 SkinningAlgorithmBase(const SkinningAlgorithmBase &source);
196 /*! \} */
197 /*---------------------------------------------------------------------*/
198 /*! \name Destructors */
199 /*! \{ */
201 virtual ~SkinningAlgorithmBase(void);
203 /*! \} */
204 /*---------------------------------------------------------------------*/
205 /*! \name onCreate */
206 /*! \{ */
208 void onCreate(const SkinningAlgorithm *source = NULL);
210 /*! \} */
211 /*---------------------------------------------------------------------*/
212 /*! \name Parent linking */
213 /*! \{ */
215 virtual bool linkParent (FieldContainer * const pParent,
216 UInt16 const childFieldId,
217 UInt16 const parentFieldId);
218 virtual bool unlinkParent(FieldContainer * const pParent,
219 UInt16 const parentFieldId);
221 /*! \} */
222 /*---------------------------------------------------------------------*/
223 /*! \name Generic Field Access */
224 /*! \{ */
226 GetFieldHandlePtr getHandleSkin (void) const;
227 EditFieldHandlePtr editHandleSkin (void);
228 GetFieldHandlePtr getHandleSkeleton (void) const;
229 EditFieldHandlePtr editHandleSkeleton (void);
231 /*! \} */
232 /*---------------------------------------------------------------------*/
233 /*! \name Sync */
234 /*! \{ */
236 #ifdef OSG_MT_CPTR_ASPECT
237 virtual void execSyncV( FieldContainer &oFrom,
238 ConstFieldMaskArg whichField,
239 AspectOffsetStore &oOffsets,
240 ConstFieldMaskArg syncMode ,
241 const UInt32 uiSyncInfo);
243 void execSync ( SkinningAlgorithmBase *pFrom,
244 ConstFieldMaskArg whichField,
245 AspectOffsetStore &oOffsets,
246 ConstFieldMaskArg syncMode ,
247 const UInt32 uiSyncInfo);
248 #endif
250 /*! \} */
251 /*---------------------------------------------------------------------*/
252 /*! \name Edit */
253 /*! \{ */
255 /*! \} */
256 /*---------------------------------------------------------------------*/
257 /*! \name Aspect Create */
258 /*! \{ */
260 /*! \} */
261 /*---------------------------------------------------------------------*/
262 /*! \name Edit */
263 /*! \{ */
264 /*! \} */
265 /*---------------------------------------------------------------------*/
266 /*! \name Sync */
267 /*! \{ */
269 virtual void resolveLinks(void);
271 /*! \} */
272 /*========================== PRIVATE ================================*/
274 private:
275 /*---------------------------------------------------------------------*/
277 // prohibit default functions (move to 'public' if you need one)
278 void operator =(const SkinningAlgorithmBase &source);
281 typedef SkinningAlgorithmBase *SkinningAlgorithmBaseP;
283 OSG_END_NAMESPACE
285 #endif /* _OSGSKINNINGALGORITHMBASE_H_ */