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 AnimQuaternionDataSource!
50 *****************************************************************************
51 \*****************************************************************************/
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
61 #include "OSGConfig.h"
66 #include "OSGAnimQuaternionDataSourceBase.h"
67 #include "OSGAnimQuaternionDataSource.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
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(),
134 OSG_FIELDTRAITS_GETTYPE_NS(AnimQuaternionDataSource
*, nsOSG
)
136 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
137 AnimQuaternionDataSource
*,
140 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
141 AnimQuaternionDataSource
*,
144 /***************************************************************************\
145 * Field Description *
146 \***************************************************************************/
148 void AnimQuaternionDataSourceBase::classDescInserter(TypeObject
&oType
)
150 FieldDescriptionBase
*pDesc
= NULL
;
153 pDesc
= new MFQuaternion::Description(
154 MFQuaternion::getClassType(),
157 ValuesFieldId
, ValuesFieldMask
,
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(),
169 InTangentsXFieldId
, InTangentsXFieldMask
,
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(),
181 InTangentsYFieldId
, InTangentsYFieldMask
,
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(),
193 InTangentsZFieldId
, InTangentsZFieldMask
,
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(),
205 InTangentsWFieldId
, InTangentsWFieldMask
,
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(),
217 OutTangentsXFieldId
, OutTangentsXFieldMask
,
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(),
229 OutTangentsYFieldId
, OutTangentsYFieldMask
,
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(),
241 OutTangentsZFieldId
, OutTangentsZFieldMask
,
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(),
253 OutTangentsWFieldId
, OutTangentsWFieldMask
,
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(),
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
)),
275 "<?xml version=\"1.0\"?>\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"
293 " category=\"data\"\n"
294 " type=\"Quaternion\"\n"
295 " cardinality=\"multi\"\n"
296 " visibility=\"external\"\n"
297 " access=\"public\"\n"
298 " fieldFlags=\"FClusterLocal\"\n"
302 " name=\"inTangentsX\"\n"
303 " category=\"data\"\n"
305 " cardinality=\"multi\"\n"
306 " visibility=\"external\"\n"
307 " access=\"public\"\n"
308 " fieldFlags=\"FClusterLocal\"\n"
312 " name=\"inTangentsY\"\n"
313 " category=\"data\"\n"
315 " cardinality=\"multi\"\n"
316 " visibility=\"external\"\n"
317 " access=\"public\"\n"
318 " fieldFlags=\"FClusterLocal\"\n"
322 " name=\"inTangentsZ\"\n"
323 " category=\"data\"\n"
325 " cardinality=\"multi\"\n"
326 " visibility=\"external\"\n"
327 " access=\"public\"\n"
328 " fieldFlags=\"FClusterLocal\"\n"
332 " name=\"inTangentsW\"\n"
333 " category=\"data\"\n"
335 " cardinality=\"multi\"\n"
336 " visibility=\"external\"\n"
337 " access=\"public\"\n"
338 " fieldFlags=\"FClusterLocal\"\n"
342 " name=\"outTangentsX\"\n"
343 " category=\"data\"\n"
345 " cardinality=\"multi\"\n"
346 " visibility=\"external\"\n"
347 " access=\"public\"\n"
348 " fieldFlags=\"FClusterLocal\"\n"
352 " name=\"outTangentsY\"\n"
353 " category=\"data\"\n"
355 " cardinality=\"multi\"\n"
356 " visibility=\"external\"\n"
357 " access=\"public\"\n"
358 " fieldFlags=\"FClusterLocal\"\n"
362 " name=\"outTangentsZ\"\n"
363 " category=\"data\"\n"
365 " cardinality=\"multi\"\n"
366 " visibility=\"external\"\n"
367 " access=\"public\"\n"
368 " fieldFlags=\"FClusterLocal\"\n"
372 " name=\"outTangentsW\"\n"
373 " category=\"data\"\n"
375 " cardinality=\"multi\"\n"
376 " visibility=\"external\"\n"
377 " access=\"public\"\n"
378 " fieldFlags=\"FClusterLocal\"\n"
381 "</FieldContainer>\n",
385 /*------------------------------ get -----------------------------------*/
387 FieldContainerType
&AnimQuaternionDataSourceBase::getType(void)
392 const FieldContainerType
&AnimQuaternionDataSourceBase::getType(void) const
397 UInt32
AnimQuaternionDataSourceBase::getContainerSize(void) const
399 return sizeof(AnimQuaternionDataSource
);
402 /*------------------------- decorator get ------------------------------*/
405 MFQuaternion
*AnimQuaternionDataSourceBase::editMFValues(void)
407 editMField(ValuesFieldMask
, _mfValues
);
412 const MFQuaternion
*AnimQuaternionDataSourceBase::getMFValues(void) const
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();
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
);
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
);
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
);
715 AnimQuaternionDataSource
*AnimQuaternionDataSourceBase::createEmptyLocal(BitVector bFlags
)
717 AnimQuaternionDataSource
*returnValue
;
719 newPtr
<AnimQuaternionDataSource
>(returnValue
, bFlags
);
721 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
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();
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
;
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
;
768 FieldContainerTransitPtr
AnimQuaternionDataSourceBase::shallowCopy(void) const
770 AnimQuaternionDataSource
*tmpPtr
;
773 dynamic_cast<const AnimQuaternionDataSource
*>(this),
774 Thread::getCurrentLocalFlags());
776 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
778 FieldContainerTransitPtr
returnValue(tmpPtr
);
786 /*------------------------- constructors ----------------------------------*/
788 AnimQuaternionDataSourceBase::AnimQuaternionDataSourceBase(void) :
802 AnimQuaternionDataSourceBase::AnimQuaternionDataSourceBase(const AnimQuaternionDataSourceBase
&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(
829 this->getType().getFieldDesc(ValuesFieldId
),
830 const_cast<AnimQuaternionDataSourceBase
*>(this)));
835 EditFieldHandlePtr
AnimQuaternionDataSourceBase::editHandleValues (void)
837 MFQuaternion::EditHandlePtr
returnValue(
838 new MFQuaternion::EditHandle(
840 this->getType().getFieldDesc(ValuesFieldId
),
844 editMField(ValuesFieldMask
, _mfValues
);
849 GetFieldHandlePtr
AnimQuaternionDataSourceBase::getHandleInTangentsX (void) const
851 MFVec2f::GetHandlePtr
returnValue(
852 new MFVec2f::GetHandle(
854 this->getType().getFieldDesc(InTangentsXFieldId
),
855 const_cast<AnimQuaternionDataSourceBase
*>(this)));
860 EditFieldHandlePtr
AnimQuaternionDataSourceBase::editHandleInTangentsX (void)
862 MFVec2f::EditHandlePtr
returnValue(
863 new MFVec2f::EditHandle(
865 this->getType().getFieldDesc(InTangentsXFieldId
),
869 editMField(InTangentsXFieldMask
, _mfInTangentsX
);
874 GetFieldHandlePtr
AnimQuaternionDataSourceBase::getHandleInTangentsY (void) const
876 MFVec2f::GetHandlePtr
returnValue(
877 new MFVec2f::GetHandle(
879 this->getType().getFieldDesc(InTangentsYFieldId
),
880 const_cast<AnimQuaternionDataSourceBase
*>(this)));
885 EditFieldHandlePtr
AnimQuaternionDataSourceBase::editHandleInTangentsY (void)
887 MFVec2f::EditHandlePtr
returnValue(
888 new MFVec2f::EditHandle(
890 this->getType().getFieldDesc(InTangentsYFieldId
),
894 editMField(InTangentsYFieldMask
, _mfInTangentsY
);
899 GetFieldHandlePtr
AnimQuaternionDataSourceBase::getHandleInTangentsZ (void) const
901 MFVec2f::GetHandlePtr
returnValue(
902 new MFVec2f::GetHandle(
904 this->getType().getFieldDesc(InTangentsZFieldId
),
905 const_cast<AnimQuaternionDataSourceBase
*>(this)));
910 EditFieldHandlePtr
AnimQuaternionDataSourceBase::editHandleInTangentsZ (void)
912 MFVec2f::EditHandlePtr
returnValue(
913 new MFVec2f::EditHandle(
915 this->getType().getFieldDesc(InTangentsZFieldId
),
919 editMField(InTangentsZFieldMask
, _mfInTangentsZ
);
924 GetFieldHandlePtr
AnimQuaternionDataSourceBase::getHandleInTangentsW (void) const
926 MFVec2f::GetHandlePtr
returnValue(
927 new MFVec2f::GetHandle(
929 this->getType().getFieldDesc(InTangentsWFieldId
),
930 const_cast<AnimQuaternionDataSourceBase
*>(this)));
935 EditFieldHandlePtr
AnimQuaternionDataSourceBase::editHandleInTangentsW (void)
937 MFVec2f::EditHandlePtr
returnValue(
938 new MFVec2f::EditHandle(
940 this->getType().getFieldDesc(InTangentsWFieldId
),
944 editMField(InTangentsWFieldMask
, _mfInTangentsW
);
949 GetFieldHandlePtr
AnimQuaternionDataSourceBase::getHandleOutTangentsX (void) const
951 MFVec2f::GetHandlePtr
returnValue(
952 new MFVec2f::GetHandle(
954 this->getType().getFieldDesc(OutTangentsXFieldId
),
955 const_cast<AnimQuaternionDataSourceBase
*>(this)));
960 EditFieldHandlePtr
AnimQuaternionDataSourceBase::editHandleOutTangentsX (void)
962 MFVec2f::EditHandlePtr
returnValue(
963 new MFVec2f::EditHandle(
965 this->getType().getFieldDesc(OutTangentsXFieldId
),
969 editMField(OutTangentsXFieldMask
, _mfOutTangentsX
);
974 GetFieldHandlePtr
AnimQuaternionDataSourceBase::getHandleOutTangentsY (void) const
976 MFVec2f::GetHandlePtr
returnValue(
977 new MFVec2f::GetHandle(
979 this->getType().getFieldDesc(OutTangentsYFieldId
),
980 const_cast<AnimQuaternionDataSourceBase
*>(this)));
985 EditFieldHandlePtr
AnimQuaternionDataSourceBase::editHandleOutTangentsY (void)
987 MFVec2f::EditHandlePtr
returnValue(
988 new MFVec2f::EditHandle(
990 this->getType().getFieldDesc(OutTangentsYFieldId
),
994 editMField(OutTangentsYFieldMask
, _mfOutTangentsY
);
999 GetFieldHandlePtr
AnimQuaternionDataSourceBase::getHandleOutTangentsZ (void) const
1001 MFVec2f::GetHandlePtr
returnValue(
1002 new MFVec2f::GetHandle(
1004 this->getType().getFieldDesc(OutTangentsZFieldId
),
1005 const_cast<AnimQuaternionDataSourceBase
*>(this)));
1010 EditFieldHandlePtr
AnimQuaternionDataSourceBase::editHandleOutTangentsZ (void)
1012 MFVec2f::EditHandlePtr
returnValue(
1013 new MFVec2f::EditHandle(
1015 this->getType().getFieldDesc(OutTangentsZFieldId
),
1019 editMField(OutTangentsZFieldMask
, _mfOutTangentsZ
);
1024 GetFieldHandlePtr
AnimQuaternionDataSourceBase::getHandleOutTangentsW (void) const
1026 MFVec2f::GetHandlePtr
returnValue(
1027 new MFVec2f::GetHandle(
1029 this->getType().getFieldDesc(OutTangentsWFieldId
),
1030 const_cast<AnimQuaternionDataSourceBase
*>(this)));
1035 EditFieldHandlePtr
AnimQuaternionDataSourceBase::editHandleOutTangentsW (void)
1037 MFVec2f::EditHandlePtr
returnValue(
1038 new MFVec2f::EditHandle(
1040 this->getType().getFieldDesc(OutTangentsWFieldId
),
1044 editMField(OutTangentsWFieldMask
, _mfOutTangentsW
);
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
),
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));
1082 void AnimQuaternionDataSourceBase::resolveLinks(void)
1084 Inherited::resolveLinks();
1086 #ifdef OSG_MT_CPTR_ASPECT
1087 AspectOffsetStore oOffsets
;
1089 _pAspectStore
->fillOffsetArray(oOffsets
, this);
1092 #ifdef OSG_MT_CPTR_ASPECT
1093 _mfValues
.terminateShare(Thread::getCurrentAspect(),
1096 #ifdef OSG_MT_CPTR_ASPECT
1097 _mfInTangentsX
.terminateShare(Thread::getCurrentAspect(),
1100 #ifdef OSG_MT_CPTR_ASPECT
1101 _mfInTangentsY
.terminateShare(Thread::getCurrentAspect(),
1104 #ifdef OSG_MT_CPTR_ASPECT
1105 _mfInTangentsZ
.terminateShare(Thread::getCurrentAspect(),
1108 #ifdef OSG_MT_CPTR_ASPECT
1109 _mfInTangentsW
.terminateShare(Thread::getCurrentAspect(),
1112 #ifdef OSG_MT_CPTR_ASPECT
1113 _mfOutTangentsX
.terminateShare(Thread::getCurrentAspect(),
1116 #ifdef OSG_MT_CPTR_ASPECT
1117 _mfOutTangentsY
.terminateShare(Thread::getCurrentAspect(),
1120 #ifdef OSG_MT_CPTR_ASPECT
1121 _mfOutTangentsZ
.terminateShare(Thread::getCurrentAspect(),
1124 #ifdef OSG_MT_CPTR_ASPECT
1125 _mfOutTangentsW
.terminateShare(Thread::getCurrentAspect(),