changed: gcc8 base update
[opensg.git] / Source / System / Dynamics / Animation / OSGAnimQuaternionDataSourceBase.cpp
blob8bd979c21608d4eabc0cc30d00482c94801ac7b1
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 AnimQuaternionDataSource!
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
53 #include <cstdlib>
54 #include <cstdio>
56 #ifdef WIN32
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
59 #endif
61 #include "OSGConfig.h"
66 #include "OSGAnimQuaternionDataSourceBase.h"
67 #include "OSGAnimQuaternionDataSource.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::AnimQuaternionDataSource
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
85 /*! \var Quaternion AnimQuaternionDataSourceBase::_mfValues
89 /*! \var Vec2f AnimQuaternionDataSourceBase::_mfInTangentsX
93 /*! \var Vec2f AnimQuaternionDataSourceBase::_mfInTangentsY
97 /*! \var Vec2f AnimQuaternionDataSourceBase::_mfInTangentsZ
101 /*! \var Vec2f AnimQuaternionDataSourceBase::_mfInTangentsW
105 /*! \var Vec2f AnimQuaternionDataSourceBase::_mfOutTangentsX
109 /*! \var Vec2f AnimQuaternionDataSourceBase::_mfOutTangentsY
113 /*! \var Vec2f AnimQuaternionDataSourceBase::_mfOutTangentsZ
117 /*! \var Vec2f AnimQuaternionDataSourceBase::_mfOutTangentsW
122 /***************************************************************************\
123 * FieldType/FieldTrait Instantiation *
124 \***************************************************************************/
126 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
127 PointerType FieldTraits<AnimQuaternionDataSource *, nsOSG>::_type(
128 "AnimQuaternionDataSourcePtr",
129 "AnimKeyFrameDataSourcePtr",
130 AnimQuaternionDataSource::getClassType(),
131 nsOSG);
132 #endif
134 OSG_FIELDTRAITS_GETTYPE_NS(AnimQuaternionDataSource *, nsOSG)
136 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
137 AnimQuaternionDataSource *,
138 nsOSG)
140 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
141 AnimQuaternionDataSource *,
142 nsOSG)
144 /***************************************************************************\
145 * Field Description *
146 \***************************************************************************/
148 void AnimQuaternionDataSourceBase::classDescInserter(TypeObject &oType)
150 FieldDescriptionBase *pDesc = NULL;
153 pDesc = new MFQuaternion::Description(
154 MFQuaternion::getClassType(),
155 "values",
157 ValuesFieldId, ValuesFieldMask,
158 false,
159 (Field::FClusterLocal),
160 static_cast<FieldEditMethodSig>(&AnimQuaternionDataSource::editHandleValues),
161 static_cast<FieldGetMethodSig >(&AnimQuaternionDataSource::getHandleValues));
163 oType.addInitialDesc(pDesc);
165 pDesc = new MFVec2f::Description(
166 MFVec2f::getClassType(),
167 "inTangentsX",
169 InTangentsXFieldId, InTangentsXFieldMask,
170 false,
171 (Field::FClusterLocal),
172 static_cast<FieldEditMethodSig>(&AnimQuaternionDataSource::editHandleInTangentsX),
173 static_cast<FieldGetMethodSig >(&AnimQuaternionDataSource::getHandleInTangentsX));
175 oType.addInitialDesc(pDesc);
177 pDesc = new MFVec2f::Description(
178 MFVec2f::getClassType(),
179 "inTangentsY",
181 InTangentsYFieldId, InTangentsYFieldMask,
182 false,
183 (Field::FClusterLocal),
184 static_cast<FieldEditMethodSig>(&AnimQuaternionDataSource::editHandleInTangentsY),
185 static_cast<FieldGetMethodSig >(&AnimQuaternionDataSource::getHandleInTangentsY));
187 oType.addInitialDesc(pDesc);
189 pDesc = new MFVec2f::Description(
190 MFVec2f::getClassType(),
191 "inTangentsZ",
193 InTangentsZFieldId, InTangentsZFieldMask,
194 false,
195 (Field::FClusterLocal),
196 static_cast<FieldEditMethodSig>(&AnimQuaternionDataSource::editHandleInTangentsZ),
197 static_cast<FieldGetMethodSig >(&AnimQuaternionDataSource::getHandleInTangentsZ));
199 oType.addInitialDesc(pDesc);
201 pDesc = new MFVec2f::Description(
202 MFVec2f::getClassType(),
203 "inTangentsW",
205 InTangentsWFieldId, InTangentsWFieldMask,
206 false,
207 (Field::FClusterLocal),
208 static_cast<FieldEditMethodSig>(&AnimQuaternionDataSource::editHandleInTangentsW),
209 static_cast<FieldGetMethodSig >(&AnimQuaternionDataSource::getHandleInTangentsW));
211 oType.addInitialDesc(pDesc);
213 pDesc = new MFVec2f::Description(
214 MFVec2f::getClassType(),
215 "outTangentsX",
217 OutTangentsXFieldId, OutTangentsXFieldMask,
218 false,
219 (Field::FClusterLocal),
220 static_cast<FieldEditMethodSig>(&AnimQuaternionDataSource::editHandleOutTangentsX),
221 static_cast<FieldGetMethodSig >(&AnimQuaternionDataSource::getHandleOutTangentsX));
223 oType.addInitialDesc(pDesc);
225 pDesc = new MFVec2f::Description(
226 MFVec2f::getClassType(),
227 "outTangentsY",
229 OutTangentsYFieldId, OutTangentsYFieldMask,
230 false,
231 (Field::FClusterLocal),
232 static_cast<FieldEditMethodSig>(&AnimQuaternionDataSource::editHandleOutTangentsY),
233 static_cast<FieldGetMethodSig >(&AnimQuaternionDataSource::getHandleOutTangentsY));
235 oType.addInitialDesc(pDesc);
237 pDesc = new MFVec2f::Description(
238 MFVec2f::getClassType(),
239 "outTangentsZ",
241 OutTangentsZFieldId, OutTangentsZFieldMask,
242 false,
243 (Field::FClusterLocal),
244 static_cast<FieldEditMethodSig>(&AnimQuaternionDataSource::editHandleOutTangentsZ),
245 static_cast<FieldGetMethodSig >(&AnimQuaternionDataSource::getHandleOutTangentsZ));
247 oType.addInitialDesc(pDesc);
249 pDesc = new MFVec2f::Description(
250 MFVec2f::getClassType(),
251 "outTangentsW",
253 OutTangentsWFieldId, OutTangentsWFieldMask,
254 false,
255 (Field::FClusterLocal),
256 static_cast<FieldEditMethodSig>(&AnimQuaternionDataSource::editHandleOutTangentsW),
257 static_cast<FieldGetMethodSig >(&AnimQuaternionDataSource::getHandleOutTangentsW));
259 oType.addInitialDesc(pDesc);
263 AnimQuaternionDataSourceBase::TypeObject AnimQuaternionDataSourceBase::_type(
264 AnimQuaternionDataSourceBase::getClassname(),
265 Inherited::getClassname(),
266 "NULL",
267 nsOSG, //Namespace
268 reinterpret_cast<PrototypeCreateF>(&AnimQuaternionDataSourceBase::createEmptyLocal),
269 reinterpret_cast<InitContainerF>(&AnimQuaternionDataSource::initMethod),
270 reinterpret_cast<ExitContainerF>(&AnimQuaternionDataSource::exitMethod),
271 reinterpret_cast<InitalInsertDescFunc>(
272 reinterpret_cast<void *>(&AnimQuaternionDataSource::classDescInserter)),
273 false,
275 "<?xml version=\"1.0\"?>\n"
276 "\n"
277 "<FieldContainer\n"
278 " name=\"AnimQuaternionDataSource\"\n"
279 " parent=\"AnimKeyFrameDataSource\"\n"
280 " library=\"Dynamics\"\n"
281 " pointerfieldtypes=\"both\"\n"
282 " structure=\"concrete\"\n"
283 " systemcomponent=\"true\"\n"
284 " parentsystemcomponent=\"true\"\n"
285 " decoratable=\"false\"\n"
286 " useLocalIncludes=\"false\"\n"
287 " isNodeCore=\"false\"\n"
288 " isBundle=\"false\"\n"
289 " parentFields=\"none\"\n"
290 ">\n"
291 " <Field\n"
292 " name=\"values\"\n"
293 " category=\"data\"\n"
294 " type=\"Quaternion\"\n"
295 " cardinality=\"multi\"\n"
296 " visibility=\"external\"\n"
297 " access=\"public\"\n"
298 " fieldFlags=\"FClusterLocal\"\n"
299 " >\n"
300 " </Field>\n"
301 " <Field\n"
302 " name=\"inTangentsX\"\n"
303 " category=\"data\"\n"
304 " type=\"Vec2f\"\n"
305 " cardinality=\"multi\"\n"
306 " visibility=\"external\"\n"
307 " access=\"public\"\n"
308 " fieldFlags=\"FClusterLocal\"\n"
309 " >\n"
310 " </Field>\n"
311 " <Field\n"
312 " name=\"inTangentsY\"\n"
313 " category=\"data\"\n"
314 " type=\"Vec2f\"\n"
315 " cardinality=\"multi\"\n"
316 " visibility=\"external\"\n"
317 " access=\"public\"\n"
318 " fieldFlags=\"FClusterLocal\"\n"
319 " >\n"
320 " </Field>\n"
321 " <Field\n"
322 " name=\"inTangentsZ\"\n"
323 " category=\"data\"\n"
324 " type=\"Vec2f\"\n"
325 " cardinality=\"multi\"\n"
326 " visibility=\"external\"\n"
327 " access=\"public\"\n"
328 " fieldFlags=\"FClusterLocal\"\n"
329 " >\n"
330 " </Field>\n"
331 " <Field\n"
332 " name=\"inTangentsW\"\n"
333 " category=\"data\"\n"
334 " type=\"Vec2f\"\n"
335 " cardinality=\"multi\"\n"
336 " visibility=\"external\"\n"
337 " access=\"public\"\n"
338 " fieldFlags=\"FClusterLocal\"\n"
339 " >\n"
340 " </Field>\n"
341 " <Field\n"
342 " name=\"outTangentsX\"\n"
343 " category=\"data\"\n"
344 " type=\"Vec2f\"\n"
345 " cardinality=\"multi\"\n"
346 " visibility=\"external\"\n"
347 " access=\"public\"\n"
348 " fieldFlags=\"FClusterLocal\"\n"
349 " >\n"
350 " </Field>\n"
351 " <Field\n"
352 " name=\"outTangentsY\"\n"
353 " category=\"data\"\n"
354 " type=\"Vec2f\"\n"
355 " cardinality=\"multi\"\n"
356 " visibility=\"external\"\n"
357 " access=\"public\"\n"
358 " fieldFlags=\"FClusterLocal\"\n"
359 " >\n"
360 " </Field>\n"
361 " <Field\n"
362 " name=\"outTangentsZ\"\n"
363 " category=\"data\"\n"
364 " type=\"Vec2f\"\n"
365 " cardinality=\"multi\"\n"
366 " visibility=\"external\"\n"
367 " access=\"public\"\n"
368 " fieldFlags=\"FClusterLocal\"\n"
369 " >\n"
370 " </Field>\n"
371 " <Field\n"
372 " name=\"outTangentsW\"\n"
373 " category=\"data\"\n"
374 " type=\"Vec2f\"\n"
375 " cardinality=\"multi\"\n"
376 " visibility=\"external\"\n"
377 " access=\"public\"\n"
378 " fieldFlags=\"FClusterLocal\"\n"
379 " >\n"
380 " </Field>\n"
381 "</FieldContainer>\n",
385 /*------------------------------ get -----------------------------------*/
387 FieldContainerType &AnimQuaternionDataSourceBase::getType(void)
389 return _type;
392 const FieldContainerType &AnimQuaternionDataSourceBase::getType(void) const
394 return _type;
397 UInt32 AnimQuaternionDataSourceBase::getContainerSize(void) const
399 return sizeof(AnimQuaternionDataSource);
402 /*------------------------- decorator get ------------------------------*/
405 MFQuaternion *AnimQuaternionDataSourceBase::editMFValues(void)
407 editMField(ValuesFieldMask, _mfValues);
409 return &_mfValues;
412 const MFQuaternion *AnimQuaternionDataSourceBase::getMFValues(void) const
414 return &_mfValues;
418 MFVec2f *AnimQuaternionDataSourceBase::editMFInTangentsX(void)
420 editMField(InTangentsXFieldMask, _mfInTangentsX);
422 return &_mfInTangentsX;
425 const MFVec2f *AnimQuaternionDataSourceBase::getMFInTangentsX(void) const
427 return &_mfInTangentsX;
431 MFVec2f *AnimQuaternionDataSourceBase::editMFInTangentsY(void)
433 editMField(InTangentsYFieldMask, _mfInTangentsY);
435 return &_mfInTangentsY;
438 const MFVec2f *AnimQuaternionDataSourceBase::getMFInTangentsY(void) const
440 return &_mfInTangentsY;
444 MFVec2f *AnimQuaternionDataSourceBase::editMFInTangentsZ(void)
446 editMField(InTangentsZFieldMask, _mfInTangentsZ);
448 return &_mfInTangentsZ;
451 const MFVec2f *AnimQuaternionDataSourceBase::getMFInTangentsZ(void) const
453 return &_mfInTangentsZ;
457 MFVec2f *AnimQuaternionDataSourceBase::editMFInTangentsW(void)
459 editMField(InTangentsWFieldMask, _mfInTangentsW);
461 return &_mfInTangentsW;
464 const MFVec2f *AnimQuaternionDataSourceBase::getMFInTangentsW(void) const
466 return &_mfInTangentsW;
470 MFVec2f *AnimQuaternionDataSourceBase::editMFOutTangentsX(void)
472 editMField(OutTangentsXFieldMask, _mfOutTangentsX);
474 return &_mfOutTangentsX;
477 const MFVec2f *AnimQuaternionDataSourceBase::getMFOutTangentsX(void) const
479 return &_mfOutTangentsX;
483 MFVec2f *AnimQuaternionDataSourceBase::editMFOutTangentsY(void)
485 editMField(OutTangentsYFieldMask, _mfOutTangentsY);
487 return &_mfOutTangentsY;
490 const MFVec2f *AnimQuaternionDataSourceBase::getMFOutTangentsY(void) const
492 return &_mfOutTangentsY;
496 MFVec2f *AnimQuaternionDataSourceBase::editMFOutTangentsZ(void)
498 editMField(OutTangentsZFieldMask, _mfOutTangentsZ);
500 return &_mfOutTangentsZ;
503 const MFVec2f *AnimQuaternionDataSourceBase::getMFOutTangentsZ(void) const
505 return &_mfOutTangentsZ;
509 MFVec2f *AnimQuaternionDataSourceBase::editMFOutTangentsW(void)
511 editMField(OutTangentsWFieldMask, _mfOutTangentsW);
513 return &_mfOutTangentsW;
516 const MFVec2f *AnimQuaternionDataSourceBase::getMFOutTangentsW(void) const
518 return &_mfOutTangentsW;
526 /*------------------------------ access -----------------------------------*/
528 SizeT AnimQuaternionDataSourceBase::getBinSize(ConstFieldMaskArg whichField)
530 SizeT returnValue = Inherited::getBinSize(whichField);
532 if(FieldBits::NoField != (ValuesFieldMask & whichField))
534 returnValue += _mfValues.getBinSize();
536 if(FieldBits::NoField != (InTangentsXFieldMask & whichField))
538 returnValue += _mfInTangentsX.getBinSize();
540 if(FieldBits::NoField != (InTangentsYFieldMask & whichField))
542 returnValue += _mfInTangentsY.getBinSize();
544 if(FieldBits::NoField != (InTangentsZFieldMask & whichField))
546 returnValue += _mfInTangentsZ.getBinSize();
548 if(FieldBits::NoField != (InTangentsWFieldMask & whichField))
550 returnValue += _mfInTangentsW.getBinSize();
552 if(FieldBits::NoField != (OutTangentsXFieldMask & whichField))
554 returnValue += _mfOutTangentsX.getBinSize();
556 if(FieldBits::NoField != (OutTangentsYFieldMask & whichField))
558 returnValue += _mfOutTangentsY.getBinSize();
560 if(FieldBits::NoField != (OutTangentsZFieldMask & whichField))
562 returnValue += _mfOutTangentsZ.getBinSize();
564 if(FieldBits::NoField != (OutTangentsWFieldMask & whichField))
566 returnValue += _mfOutTangentsW.getBinSize();
569 return returnValue;
572 void AnimQuaternionDataSourceBase::copyToBin(BinaryDataHandler &pMem,
573 ConstFieldMaskArg whichField)
575 Inherited::copyToBin(pMem, whichField);
577 if(FieldBits::NoField != (ValuesFieldMask & whichField))
579 _mfValues.copyToBin(pMem);
581 if(FieldBits::NoField != (InTangentsXFieldMask & whichField))
583 _mfInTangentsX.copyToBin(pMem);
585 if(FieldBits::NoField != (InTangentsYFieldMask & whichField))
587 _mfInTangentsY.copyToBin(pMem);
589 if(FieldBits::NoField != (InTangentsZFieldMask & whichField))
591 _mfInTangentsZ.copyToBin(pMem);
593 if(FieldBits::NoField != (InTangentsWFieldMask & whichField))
595 _mfInTangentsW.copyToBin(pMem);
597 if(FieldBits::NoField != (OutTangentsXFieldMask & whichField))
599 _mfOutTangentsX.copyToBin(pMem);
601 if(FieldBits::NoField != (OutTangentsYFieldMask & whichField))
603 _mfOutTangentsY.copyToBin(pMem);
605 if(FieldBits::NoField != (OutTangentsZFieldMask & whichField))
607 _mfOutTangentsZ.copyToBin(pMem);
609 if(FieldBits::NoField != (OutTangentsWFieldMask & whichField))
611 _mfOutTangentsW.copyToBin(pMem);
615 void AnimQuaternionDataSourceBase::copyFromBin(BinaryDataHandler &pMem,
616 ConstFieldMaskArg whichField)
618 Inherited::copyFromBin(pMem, whichField);
620 if(FieldBits::NoField != (ValuesFieldMask & whichField))
622 editMField(ValuesFieldMask, _mfValues);
623 _mfValues.copyFromBin(pMem);
625 if(FieldBits::NoField != (InTangentsXFieldMask & whichField))
627 editMField(InTangentsXFieldMask, _mfInTangentsX);
628 _mfInTangentsX.copyFromBin(pMem);
630 if(FieldBits::NoField != (InTangentsYFieldMask & whichField))
632 editMField(InTangentsYFieldMask, _mfInTangentsY);
633 _mfInTangentsY.copyFromBin(pMem);
635 if(FieldBits::NoField != (InTangentsZFieldMask & whichField))
637 editMField(InTangentsZFieldMask, _mfInTangentsZ);
638 _mfInTangentsZ.copyFromBin(pMem);
640 if(FieldBits::NoField != (InTangentsWFieldMask & whichField))
642 editMField(InTangentsWFieldMask, _mfInTangentsW);
643 _mfInTangentsW.copyFromBin(pMem);
645 if(FieldBits::NoField != (OutTangentsXFieldMask & whichField))
647 editMField(OutTangentsXFieldMask, _mfOutTangentsX);
648 _mfOutTangentsX.copyFromBin(pMem);
650 if(FieldBits::NoField != (OutTangentsYFieldMask & whichField))
652 editMField(OutTangentsYFieldMask, _mfOutTangentsY);
653 _mfOutTangentsY.copyFromBin(pMem);
655 if(FieldBits::NoField != (OutTangentsZFieldMask & whichField))
657 editMField(OutTangentsZFieldMask, _mfOutTangentsZ);
658 _mfOutTangentsZ.copyFromBin(pMem);
660 if(FieldBits::NoField != (OutTangentsWFieldMask & whichField))
662 editMField(OutTangentsWFieldMask, _mfOutTangentsW);
663 _mfOutTangentsW.copyFromBin(pMem);
667 //! create a new instance of the class
668 AnimQuaternionDataSourceTransitPtr AnimQuaternionDataSourceBase::createLocal(BitVector bFlags)
670 AnimQuaternionDataSourceTransitPtr fc;
672 if(getClassType().getPrototype() != NULL)
674 FieldContainerTransitPtr tmpPtr =
675 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
677 fc = dynamic_pointer_cast<AnimQuaternionDataSource>(tmpPtr);
680 return fc;
683 //! create a new instance of the class, copy the container flags
684 AnimQuaternionDataSourceTransitPtr AnimQuaternionDataSourceBase::createDependent(BitVector bFlags)
686 AnimQuaternionDataSourceTransitPtr fc;
688 if(getClassType().getPrototype() != NULL)
690 FieldContainerTransitPtr tmpPtr =
691 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
693 fc = dynamic_pointer_cast<AnimQuaternionDataSource>(tmpPtr);
696 return fc;
699 //! create a new instance of the class
700 AnimQuaternionDataSourceTransitPtr AnimQuaternionDataSourceBase::create(void)
702 AnimQuaternionDataSourceTransitPtr fc;
704 if(getClassType().getPrototype() != NULL)
706 FieldContainerTransitPtr tmpPtr =
707 getClassType().getPrototype()-> shallowCopy();
709 fc = dynamic_pointer_cast<AnimQuaternionDataSource>(tmpPtr);
712 return fc;
715 AnimQuaternionDataSource *AnimQuaternionDataSourceBase::createEmptyLocal(BitVector bFlags)
717 AnimQuaternionDataSource *returnValue;
719 newPtr<AnimQuaternionDataSource>(returnValue, bFlags);
721 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
723 return returnValue;
726 //! create an empty new instance of the class, do not copy the prototype
727 AnimQuaternionDataSource *AnimQuaternionDataSourceBase::createEmpty(void)
729 AnimQuaternionDataSource *returnValue;
731 newPtr<AnimQuaternionDataSource>(returnValue, Thread::getCurrentLocalFlags());
733 returnValue->_pFieldFlags->_bNamespaceMask &=
734 ~Thread::getCurrentLocalFlags();
736 return returnValue;
740 FieldContainerTransitPtr AnimQuaternionDataSourceBase::shallowCopyLocal(
741 BitVector bFlags) const
743 AnimQuaternionDataSource *tmpPtr;
745 newPtr(tmpPtr, dynamic_cast<const AnimQuaternionDataSource *>(this), bFlags);
747 FieldContainerTransitPtr returnValue(tmpPtr);
749 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
751 return returnValue;
754 FieldContainerTransitPtr AnimQuaternionDataSourceBase::shallowCopyDependent(
755 BitVector bFlags) const
757 AnimQuaternionDataSource *tmpPtr;
759 newPtr(tmpPtr, dynamic_cast<const AnimQuaternionDataSource *>(this), ~bFlags);
761 FieldContainerTransitPtr returnValue(tmpPtr);
763 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
765 return returnValue;
768 FieldContainerTransitPtr AnimQuaternionDataSourceBase::shallowCopy(void) const
770 AnimQuaternionDataSource *tmpPtr;
772 newPtr(tmpPtr,
773 dynamic_cast<const AnimQuaternionDataSource *>(this),
774 Thread::getCurrentLocalFlags());
776 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
778 FieldContainerTransitPtr returnValue(tmpPtr);
780 return returnValue;
786 /*------------------------- constructors ----------------------------------*/
788 AnimQuaternionDataSourceBase::AnimQuaternionDataSourceBase(void) :
789 Inherited(),
790 _mfValues (),
791 _mfInTangentsX (),
792 _mfInTangentsY (),
793 _mfInTangentsZ (),
794 _mfInTangentsW (),
795 _mfOutTangentsX (),
796 _mfOutTangentsY (),
797 _mfOutTangentsZ (),
798 _mfOutTangentsW ()
802 AnimQuaternionDataSourceBase::AnimQuaternionDataSourceBase(const AnimQuaternionDataSourceBase &source) :
803 Inherited(source),
804 _mfValues (source._mfValues ),
805 _mfInTangentsX (source._mfInTangentsX ),
806 _mfInTangentsY (source._mfInTangentsY ),
807 _mfInTangentsZ (source._mfInTangentsZ ),
808 _mfInTangentsW (source._mfInTangentsW ),
809 _mfOutTangentsX (source._mfOutTangentsX ),
810 _mfOutTangentsY (source._mfOutTangentsY ),
811 _mfOutTangentsZ (source._mfOutTangentsZ ),
812 _mfOutTangentsW (source._mfOutTangentsW )
817 /*-------------------------- destructors ----------------------------------*/
819 AnimQuaternionDataSourceBase::~AnimQuaternionDataSourceBase(void)
824 GetFieldHandlePtr AnimQuaternionDataSourceBase::getHandleValues (void) const
826 MFQuaternion::GetHandlePtr returnValue(
827 new MFQuaternion::GetHandle(
828 &_mfValues,
829 this->getType().getFieldDesc(ValuesFieldId),
830 const_cast<AnimQuaternionDataSourceBase *>(this)));
832 return returnValue;
835 EditFieldHandlePtr AnimQuaternionDataSourceBase::editHandleValues (void)
837 MFQuaternion::EditHandlePtr returnValue(
838 new MFQuaternion::EditHandle(
839 &_mfValues,
840 this->getType().getFieldDesc(ValuesFieldId),
841 this));
844 editMField(ValuesFieldMask, _mfValues);
846 return returnValue;
849 GetFieldHandlePtr AnimQuaternionDataSourceBase::getHandleInTangentsX (void) const
851 MFVec2f::GetHandlePtr returnValue(
852 new MFVec2f::GetHandle(
853 &_mfInTangentsX,
854 this->getType().getFieldDesc(InTangentsXFieldId),
855 const_cast<AnimQuaternionDataSourceBase *>(this)));
857 return returnValue;
860 EditFieldHandlePtr AnimQuaternionDataSourceBase::editHandleInTangentsX (void)
862 MFVec2f::EditHandlePtr returnValue(
863 new MFVec2f::EditHandle(
864 &_mfInTangentsX,
865 this->getType().getFieldDesc(InTangentsXFieldId),
866 this));
869 editMField(InTangentsXFieldMask, _mfInTangentsX);
871 return returnValue;
874 GetFieldHandlePtr AnimQuaternionDataSourceBase::getHandleInTangentsY (void) const
876 MFVec2f::GetHandlePtr returnValue(
877 new MFVec2f::GetHandle(
878 &_mfInTangentsY,
879 this->getType().getFieldDesc(InTangentsYFieldId),
880 const_cast<AnimQuaternionDataSourceBase *>(this)));
882 return returnValue;
885 EditFieldHandlePtr AnimQuaternionDataSourceBase::editHandleInTangentsY (void)
887 MFVec2f::EditHandlePtr returnValue(
888 new MFVec2f::EditHandle(
889 &_mfInTangentsY,
890 this->getType().getFieldDesc(InTangentsYFieldId),
891 this));
894 editMField(InTangentsYFieldMask, _mfInTangentsY);
896 return returnValue;
899 GetFieldHandlePtr AnimQuaternionDataSourceBase::getHandleInTangentsZ (void) const
901 MFVec2f::GetHandlePtr returnValue(
902 new MFVec2f::GetHandle(
903 &_mfInTangentsZ,
904 this->getType().getFieldDesc(InTangentsZFieldId),
905 const_cast<AnimQuaternionDataSourceBase *>(this)));
907 return returnValue;
910 EditFieldHandlePtr AnimQuaternionDataSourceBase::editHandleInTangentsZ (void)
912 MFVec2f::EditHandlePtr returnValue(
913 new MFVec2f::EditHandle(
914 &_mfInTangentsZ,
915 this->getType().getFieldDesc(InTangentsZFieldId),
916 this));
919 editMField(InTangentsZFieldMask, _mfInTangentsZ);
921 return returnValue;
924 GetFieldHandlePtr AnimQuaternionDataSourceBase::getHandleInTangentsW (void) const
926 MFVec2f::GetHandlePtr returnValue(
927 new MFVec2f::GetHandle(
928 &_mfInTangentsW,
929 this->getType().getFieldDesc(InTangentsWFieldId),
930 const_cast<AnimQuaternionDataSourceBase *>(this)));
932 return returnValue;
935 EditFieldHandlePtr AnimQuaternionDataSourceBase::editHandleInTangentsW (void)
937 MFVec2f::EditHandlePtr returnValue(
938 new MFVec2f::EditHandle(
939 &_mfInTangentsW,
940 this->getType().getFieldDesc(InTangentsWFieldId),
941 this));
944 editMField(InTangentsWFieldMask, _mfInTangentsW);
946 return returnValue;
949 GetFieldHandlePtr AnimQuaternionDataSourceBase::getHandleOutTangentsX (void) const
951 MFVec2f::GetHandlePtr returnValue(
952 new MFVec2f::GetHandle(
953 &_mfOutTangentsX,
954 this->getType().getFieldDesc(OutTangentsXFieldId),
955 const_cast<AnimQuaternionDataSourceBase *>(this)));
957 return returnValue;
960 EditFieldHandlePtr AnimQuaternionDataSourceBase::editHandleOutTangentsX (void)
962 MFVec2f::EditHandlePtr returnValue(
963 new MFVec2f::EditHandle(
964 &_mfOutTangentsX,
965 this->getType().getFieldDesc(OutTangentsXFieldId),
966 this));
969 editMField(OutTangentsXFieldMask, _mfOutTangentsX);
971 return returnValue;
974 GetFieldHandlePtr AnimQuaternionDataSourceBase::getHandleOutTangentsY (void) const
976 MFVec2f::GetHandlePtr returnValue(
977 new MFVec2f::GetHandle(
978 &_mfOutTangentsY,
979 this->getType().getFieldDesc(OutTangentsYFieldId),
980 const_cast<AnimQuaternionDataSourceBase *>(this)));
982 return returnValue;
985 EditFieldHandlePtr AnimQuaternionDataSourceBase::editHandleOutTangentsY (void)
987 MFVec2f::EditHandlePtr returnValue(
988 new MFVec2f::EditHandle(
989 &_mfOutTangentsY,
990 this->getType().getFieldDesc(OutTangentsYFieldId),
991 this));
994 editMField(OutTangentsYFieldMask, _mfOutTangentsY);
996 return returnValue;
999 GetFieldHandlePtr AnimQuaternionDataSourceBase::getHandleOutTangentsZ (void) const
1001 MFVec2f::GetHandlePtr returnValue(
1002 new MFVec2f::GetHandle(
1003 &_mfOutTangentsZ,
1004 this->getType().getFieldDesc(OutTangentsZFieldId),
1005 const_cast<AnimQuaternionDataSourceBase *>(this)));
1007 return returnValue;
1010 EditFieldHandlePtr AnimQuaternionDataSourceBase::editHandleOutTangentsZ (void)
1012 MFVec2f::EditHandlePtr returnValue(
1013 new MFVec2f::EditHandle(
1014 &_mfOutTangentsZ,
1015 this->getType().getFieldDesc(OutTangentsZFieldId),
1016 this));
1019 editMField(OutTangentsZFieldMask, _mfOutTangentsZ);
1021 return returnValue;
1024 GetFieldHandlePtr AnimQuaternionDataSourceBase::getHandleOutTangentsW (void) const
1026 MFVec2f::GetHandlePtr returnValue(
1027 new MFVec2f::GetHandle(
1028 &_mfOutTangentsW,
1029 this->getType().getFieldDesc(OutTangentsWFieldId),
1030 const_cast<AnimQuaternionDataSourceBase *>(this)));
1032 return returnValue;
1035 EditFieldHandlePtr AnimQuaternionDataSourceBase::editHandleOutTangentsW (void)
1037 MFVec2f::EditHandlePtr returnValue(
1038 new MFVec2f::EditHandle(
1039 &_mfOutTangentsW,
1040 this->getType().getFieldDesc(OutTangentsWFieldId),
1041 this));
1044 editMField(OutTangentsWFieldMask, _mfOutTangentsW);
1046 return returnValue;
1050 #ifdef OSG_MT_CPTR_ASPECT
1051 void AnimQuaternionDataSourceBase::execSyncV( FieldContainer &oFrom,
1052 ConstFieldMaskArg whichField,
1053 AspectOffsetStore &oOffsets,
1054 ConstFieldMaskArg syncMode,
1055 const UInt32 uiSyncInfo)
1057 AnimQuaternionDataSource *pThis = static_cast<AnimQuaternionDataSource *>(this);
1059 pThis->execSync(static_cast<AnimQuaternionDataSource *>(&oFrom),
1060 whichField,
1061 oOffsets,
1062 syncMode,
1063 uiSyncInfo);
1065 #endif
1068 #ifdef OSG_MT_CPTR_ASPECT
1069 FieldContainer *AnimQuaternionDataSourceBase::createAspectCopy(
1070 const FieldContainer *pRefAspect) const
1072 AnimQuaternionDataSource *returnValue;
1074 newAspectCopy(returnValue,
1075 dynamic_cast<const AnimQuaternionDataSource *>(pRefAspect),
1076 dynamic_cast<const AnimQuaternionDataSource *>(this));
1078 return returnValue;
1080 #endif
1082 void AnimQuaternionDataSourceBase::resolveLinks(void)
1084 Inherited::resolveLinks();
1086 #ifdef OSG_MT_CPTR_ASPECT
1087 AspectOffsetStore oOffsets;
1089 _pAspectStore->fillOffsetArray(oOffsets, this);
1090 #endif
1092 #ifdef OSG_MT_CPTR_ASPECT
1093 _mfValues.terminateShare(Thread::getCurrentAspect(),
1094 oOffsets);
1095 #endif
1096 #ifdef OSG_MT_CPTR_ASPECT
1097 _mfInTangentsX.terminateShare(Thread::getCurrentAspect(),
1098 oOffsets);
1099 #endif
1100 #ifdef OSG_MT_CPTR_ASPECT
1101 _mfInTangentsY.terminateShare(Thread::getCurrentAspect(),
1102 oOffsets);
1103 #endif
1104 #ifdef OSG_MT_CPTR_ASPECT
1105 _mfInTangentsZ.terminateShare(Thread::getCurrentAspect(),
1106 oOffsets);
1107 #endif
1108 #ifdef OSG_MT_CPTR_ASPECT
1109 _mfInTangentsW.terminateShare(Thread::getCurrentAspect(),
1110 oOffsets);
1111 #endif
1112 #ifdef OSG_MT_CPTR_ASPECT
1113 _mfOutTangentsX.terminateShare(Thread::getCurrentAspect(),
1114 oOffsets);
1115 #endif
1116 #ifdef OSG_MT_CPTR_ASPECT
1117 _mfOutTangentsY.terminateShare(Thread::getCurrentAspect(),
1118 oOffsets);
1119 #endif
1120 #ifdef OSG_MT_CPTR_ASPECT
1121 _mfOutTangentsZ.terminateShare(Thread::getCurrentAspect(),
1122 oOffsets);
1123 #endif
1124 #ifdef OSG_MT_CPTR_ASPECT
1125 _mfOutTangentsW.terminateShare(Thread::getCurrentAspect(),
1126 oOffsets);
1127 #endif
1131 OSG_END_NAMESPACE