changed: gcc8 base update
[opensg.git] / Source / System / Dynamics / Skeleton / OSGCPUSkinningDataAttachmentBase.h
blobbd14b388741ba810d18d9f8c5cd7a4b900cb612b
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 CPUSkinningDataAttachment
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
54 #ifndef _OSGCPUSKINNINGDATAATTACHMENTBASE_H_
55 #define _OSGCPUSKINNINGDATAATTACHMENTBASE_H_
56 #ifdef __sgi
57 #pragma once
58 #endif
61 #include "OSGConfig.h"
62 #include "OSGDynamicsDef.h"
64 //#include "OSGBaseTypes.h"
66 #include "OSGAttachment.h" // Parent
68 #include "OSGGeoVectorPropertyFields.h" // Properties type
69 #include "OSGMathFields.h" // JointMatrices type
70 #include "OSGSysFields.h" // DataValid type
72 #include "OSGCPUSkinningDataAttachmentFields.h"
74 OSG_BEGIN_NAMESPACE
77 class CPUSkinningDataAttachment;
79 //! \brief CPUSkinningDataAttachment Base Class.
81 class OSG_DYNAMICS_DLLMAPPING CPUSkinningDataAttachmentBase : public Attachment
83 public:
85 typedef Attachment Inherited;
86 typedef Attachment ParentContainer;
88 typedef Inherited::TypeObject TypeObject;
89 typedef TypeObject::InitPhase InitPhase;
91 OSG_GEN_INTERNALPTR(CPUSkinningDataAttachment);
93 /*========================== PUBLIC =================================*/
95 public:
97 enum
99 PropertiesFieldId = Inherited::NextFieldId,
100 JointMatricesFieldId = PropertiesFieldId + 1,
101 JointNormalMatricesFieldId = JointMatricesFieldId + 1,
102 DataValidFieldId = JointNormalMatricesFieldId + 1,
103 NextFieldId = DataValidFieldId + 1
106 static const OSG::BitVector PropertiesFieldMask =
107 (TypeTraits<BitVector>::One << PropertiesFieldId);
108 static const OSG::BitVector JointMatricesFieldMask =
109 (TypeTraits<BitVector>::One << JointMatricesFieldId);
110 static const OSG::BitVector JointNormalMatricesFieldMask =
111 (TypeTraits<BitVector>::One << JointNormalMatricesFieldId);
112 static const OSG::BitVector DataValidFieldMask =
113 (TypeTraits<BitVector>::One << DataValidFieldId);
114 static const OSG::BitVector NextFieldMask =
115 (TypeTraits<BitVector>::One << NextFieldId);
117 typedef MFUnrecChildGeoVectorPropertyPtr MFPropertiesType;
118 typedef MFMatrix MFJointMatricesType;
119 typedef MFMatrix MFJointNormalMatricesType;
120 typedef SFBool SFDataValidType;
122 /*---------------------------------------------------------------------*/
123 /*! \name Class Get */
124 /*! \{ */
126 static FieldContainerType &getClassType (void);
127 static UInt32 getClassTypeId (void);
128 static UInt16 getClassGroupId(void);
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name FieldContainer Get */
133 /*! \{ */
135 virtual FieldContainerType &getType (void);
136 virtual const FieldContainerType &getType (void) const;
138 virtual UInt32 getContainerSize(void) const;
140 /*! \} */
141 /*---------------------------------------------------------------------*/
142 /*! \name Field Get */
143 /*! \{ */
145 const MFUnrecChildGeoVectorPropertyPtr *getMFProperties (void) const;
146 MFUnrecChildGeoVectorPropertyPtr *editMFProperties (void);
148 MFMatrix *editMFJointMatrices (void);
149 const MFMatrix *getMFJointMatrices (void) const;
151 MFMatrix *editMFJointNormalMatrices(void);
152 const MFMatrix *getMFJointNormalMatrices (void) const;
154 SFBool *editSFDataValid (void);
155 const SFBool *getSFDataValid (void) const;
158 GeoVectorProperty * getProperties (const UInt32 index) const;
160 MFMatrix ::reference editJointMatrices (const UInt32 index);
161 const Matrix &getJointMatrices (const UInt32 index) const;
163 MFMatrix ::reference editJointNormalMatrices(const UInt32 index);
164 const Matrix &getJointNormalMatrices (const UInt32 index) const;
166 bool &editDataValid (void);
167 bool getDataValid (void) const;
169 /*! \} */
170 /*---------------------------------------------------------------------*/
171 /*! \name Field Set */
172 /*! \{ */
174 void setDataValid (const bool value);
176 /*! \} */
177 /*---------------------------------------------------------------------*/
178 /*! \name Ptr Field Set */
179 /*! \{ */
181 /*! \} */
182 /*---------------------------------------------------------------------*/
183 /*! \name Ptr MField Set */
184 /*! \{ */
186 void pushToProperties (GeoVectorProperty * const value );
187 void assignProperties (const MFUnrecChildGeoVectorPropertyPtr &value);
188 void removeFromProperties (UInt32 uiIndex );
189 void removeObjFromProperties(GeoVectorProperty * const value );
190 void clearProperties (void );
192 /*! \} */
193 /*---------------------------------------------------------------------*/
194 /*! \name Binary Access */
195 /*! \{ */
197 virtual SizeT getBinSize (ConstFieldMaskArg whichField);
198 virtual void copyToBin (BinaryDataHandler &pMem,
199 ConstFieldMaskArg whichField);
200 virtual void copyFromBin(BinaryDataHandler &pMem,
201 ConstFieldMaskArg whichField);
204 /*! \} */
205 /*---------------------------------------------------------------------*/
206 /*! \name Construction */
207 /*! \{ */
209 static CPUSkinningDataAttachmentTransitPtr create (void);
210 static CPUSkinningDataAttachment *createEmpty (void);
212 static CPUSkinningDataAttachmentTransitPtr createLocal (
213 BitVector bFlags = FCLocal::All);
215 static CPUSkinningDataAttachment *createEmptyLocal(
216 BitVector bFlags = FCLocal::All);
218 static CPUSkinningDataAttachmentTransitPtr createDependent (BitVector bFlags);
220 /*! \} */
221 /*---------------------------------------------------------------------*/
222 /*! \name Copy */
223 /*! \{ */
225 virtual FieldContainerTransitPtr shallowCopy (void) const;
226 virtual FieldContainerTransitPtr shallowCopyLocal(
227 BitVector bFlags = FCLocal::All) const;
228 virtual FieldContainerTransitPtr shallowCopyDependent(
229 BitVector bFlags) const;
231 /*! \} */
232 /*========================= PROTECTED ===============================*/
234 protected:
236 static TypeObject _type;
238 static void classDescInserter(TypeObject &oType);
239 static const Char8 *getClassname (void );
241 /*---------------------------------------------------------------------*/
242 /*! \name Fields */
243 /*! \{ */
245 MFUnrecChildGeoVectorPropertyPtr _mfProperties;
246 MFMatrix _mfJointMatrices;
247 MFMatrix _mfJointNormalMatrices;
248 SFBool _sfDataValid;
250 /*! \} */
251 /*---------------------------------------------------------------------*/
252 /*! \name Constructors */
253 /*! \{ */
255 CPUSkinningDataAttachmentBase(void);
256 CPUSkinningDataAttachmentBase(const CPUSkinningDataAttachmentBase &source);
258 /*! \} */
259 /*---------------------------------------------------------------------*/
260 /*! \name Destructors */
261 /*! \{ */
263 virtual ~CPUSkinningDataAttachmentBase(void);
265 /*! \} */
266 /*---------------------------------------------------------------------*/
267 /*! \name onCreate */
268 /*! \{ */
270 void onCreate(const CPUSkinningDataAttachment *source = NULL);
272 /*! \} */
273 /*---------------------------------------------------------------------*/
274 /*! \name Child linking */
275 /*! \{ */
277 virtual bool unlinkChild(FieldContainer * const pChild,
278 UInt16 const childFieldId);
280 /*! \} */
281 /*---------------------------------------------------------------------*/
282 /*! \name Generic Field Access */
283 /*! \{ */
285 GetFieldHandlePtr getHandleProperties (void) const;
286 EditFieldHandlePtr editHandleProperties (void);
287 GetFieldHandlePtr getHandleJointMatrices (void) const;
288 EditFieldHandlePtr editHandleJointMatrices (void);
289 GetFieldHandlePtr getHandleJointNormalMatrices (void) const;
290 EditFieldHandlePtr editHandleJointNormalMatrices(void);
291 GetFieldHandlePtr getHandleDataValid (void) const;
292 EditFieldHandlePtr editHandleDataValid (void);
294 /*! \} */
295 /*---------------------------------------------------------------------*/
296 /*! \name Sync */
297 /*! \{ */
299 #ifdef OSG_MT_CPTR_ASPECT
300 virtual void execSyncV( FieldContainer &oFrom,
301 ConstFieldMaskArg whichField,
302 AspectOffsetStore &oOffsets,
303 ConstFieldMaskArg syncMode ,
304 const UInt32 uiSyncInfo);
306 void execSync ( CPUSkinningDataAttachmentBase *pFrom,
307 ConstFieldMaskArg whichField,
308 AspectOffsetStore &oOffsets,
309 ConstFieldMaskArg syncMode ,
310 const UInt32 uiSyncInfo);
311 #endif
313 /*! \} */
314 /*---------------------------------------------------------------------*/
315 /*! \name Edit */
316 /*! \{ */
318 /*! \} */
319 /*---------------------------------------------------------------------*/
320 /*! \name Aspect Create */
321 /*! \{ */
323 #ifdef OSG_MT_CPTR_ASPECT
324 virtual FieldContainer *createAspectCopy(
325 const FieldContainer *pRefAspect) const;
326 #endif
328 /*! \} */
329 /*---------------------------------------------------------------------*/
330 /*! \name Edit */
331 /*! \{ */
332 /*! \} */
333 /*---------------------------------------------------------------------*/
334 /*! \name Sync */
335 /*! \{ */
337 virtual void resolveLinks(void);
339 /*! \} */
340 /*========================== PRIVATE ================================*/
342 private:
343 /*---------------------------------------------------------------------*/
345 // prohibit default functions (move to 'public' if you need one)
346 void operator =(const CPUSkinningDataAttachmentBase &source);
349 typedef CPUSkinningDataAttachmentBase *CPUSkinningDataAttachmentBaseP;
351 OSG_END_NAMESPACE
353 #endif /* _OSGCPUSKINNINGDATAATTACHMENTBASE_H_ */