changed: gcc8 base update
[opensg.git] / Source / System / Dynamics / Animation / OSGAnimVec3fDataSourceBase.cpp
blobbf6e6d69569be446dbacadadd1f1c93d441fe278
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 AnimVec3fDataSource!
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 "OSGAnimVec3fDataSourceBase.h"
67 #include "OSGAnimVec3fDataSource.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
75 \***************************************************************************/
77 /*! \class OSG::AnimVec3fDataSource
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
85 /*! \var Vec3f AnimVec3fDataSourceBase::_mfValues
89 /*! \var Vec2f AnimVec3fDataSourceBase::_mfInTangentsX
93 /*! \var Vec2f AnimVec3fDataSourceBase::_mfInTangentsY
97 /*! \var Vec2f AnimVec3fDataSourceBase::_mfInTangentsZ
101 /*! \var Vec2f AnimVec3fDataSourceBase::_mfOutTangentsX
105 /*! \var Vec2f AnimVec3fDataSourceBase::_mfOutTangentsY
109 /*! \var Vec2f AnimVec3fDataSourceBase::_mfOutTangentsZ
114 /***************************************************************************\
115 * FieldType/FieldTrait Instantiation *
116 \***************************************************************************/
118 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
119 PointerType FieldTraits<AnimVec3fDataSource *, nsOSG>::_type(
120 "AnimVec3fDataSourcePtr",
121 "AnimKeyFrameDataSourcePtr",
122 AnimVec3fDataSource::getClassType(),
123 nsOSG);
124 #endif
126 OSG_FIELDTRAITS_GETTYPE_NS(AnimVec3fDataSource *, nsOSG)
128 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
129 AnimVec3fDataSource *,
130 nsOSG)
132 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
133 AnimVec3fDataSource *,
134 nsOSG)
136 /***************************************************************************\
137 * Field Description *
138 \***************************************************************************/
140 void AnimVec3fDataSourceBase::classDescInserter(TypeObject &oType)
142 FieldDescriptionBase *pDesc = NULL;
145 pDesc = new MFVec3f::Description(
146 MFVec3f::getClassType(),
147 "values",
149 ValuesFieldId, ValuesFieldMask,
150 false,
151 (Field::FClusterLocal),
152 static_cast<FieldEditMethodSig>(&AnimVec3fDataSource::editHandleValues),
153 static_cast<FieldGetMethodSig >(&AnimVec3fDataSource::getHandleValues));
155 oType.addInitialDesc(pDesc);
157 pDesc = new MFVec2f::Description(
158 MFVec2f::getClassType(),
159 "inTangentsX",
161 InTangentsXFieldId, InTangentsXFieldMask,
162 false,
163 (Field::FClusterLocal),
164 static_cast<FieldEditMethodSig>(&AnimVec3fDataSource::editHandleInTangentsX),
165 static_cast<FieldGetMethodSig >(&AnimVec3fDataSource::getHandleInTangentsX));
167 oType.addInitialDesc(pDesc);
169 pDesc = new MFVec2f::Description(
170 MFVec2f::getClassType(),
171 "inTangentsY",
173 InTangentsYFieldId, InTangentsYFieldMask,
174 false,
175 (Field::FClusterLocal),
176 static_cast<FieldEditMethodSig>(&AnimVec3fDataSource::editHandleInTangentsY),
177 static_cast<FieldGetMethodSig >(&AnimVec3fDataSource::getHandleInTangentsY));
179 oType.addInitialDesc(pDesc);
181 pDesc = new MFVec2f::Description(
182 MFVec2f::getClassType(),
183 "inTangentsZ",
185 InTangentsZFieldId, InTangentsZFieldMask,
186 false,
187 (Field::FClusterLocal),
188 static_cast<FieldEditMethodSig>(&AnimVec3fDataSource::editHandleInTangentsZ),
189 static_cast<FieldGetMethodSig >(&AnimVec3fDataSource::getHandleInTangentsZ));
191 oType.addInitialDesc(pDesc);
193 pDesc = new MFVec2f::Description(
194 MFVec2f::getClassType(),
195 "outTangentsX",
197 OutTangentsXFieldId, OutTangentsXFieldMask,
198 false,
199 (Field::FClusterLocal),
200 static_cast<FieldEditMethodSig>(&AnimVec3fDataSource::editHandleOutTangentsX),
201 static_cast<FieldGetMethodSig >(&AnimVec3fDataSource::getHandleOutTangentsX));
203 oType.addInitialDesc(pDesc);
205 pDesc = new MFVec2f::Description(
206 MFVec2f::getClassType(),
207 "outTangentsY",
209 OutTangentsYFieldId, OutTangentsYFieldMask,
210 false,
211 (Field::FClusterLocal),
212 static_cast<FieldEditMethodSig>(&AnimVec3fDataSource::editHandleOutTangentsY),
213 static_cast<FieldGetMethodSig >(&AnimVec3fDataSource::getHandleOutTangentsY));
215 oType.addInitialDesc(pDesc);
217 pDesc = new MFVec2f::Description(
218 MFVec2f::getClassType(),
219 "outTangentsZ",
221 OutTangentsZFieldId, OutTangentsZFieldMask,
222 false,
223 (Field::FClusterLocal),
224 static_cast<FieldEditMethodSig>(&AnimVec3fDataSource::editHandleOutTangentsZ),
225 static_cast<FieldGetMethodSig >(&AnimVec3fDataSource::getHandleOutTangentsZ));
227 oType.addInitialDesc(pDesc);
231 AnimVec3fDataSourceBase::TypeObject AnimVec3fDataSourceBase::_type(
232 AnimVec3fDataSourceBase::getClassname(),
233 Inherited::getClassname(),
234 "NULL",
235 nsOSG, //Namespace
236 reinterpret_cast<PrototypeCreateF>(&AnimVec3fDataSourceBase::createEmptyLocal),
237 reinterpret_cast<InitContainerF>(&AnimVec3fDataSource::initMethod),
238 reinterpret_cast<ExitContainerF>(&AnimVec3fDataSource::exitMethod),
239 reinterpret_cast<InitalInsertDescFunc>(
240 reinterpret_cast<void *>(&AnimVec3fDataSource::classDescInserter)),
241 false,
243 "<?xml version=\"1.0\"?>\n"
244 "\n"
245 "<FieldContainer\n"
246 " name=\"AnimVec3fDataSource\"\n"
247 " parent=\"AnimKeyFrameDataSource\"\n"
248 " library=\"Dynamics\"\n"
249 " pointerfieldtypes=\"both\"\n"
250 " structure=\"concrete\"\n"
251 " systemcomponent=\"true\"\n"
252 " parentsystemcomponent=\"true\"\n"
253 " decoratable=\"false\"\n"
254 " useLocalIncludes=\"false\"\n"
255 " isNodeCore=\"false\"\n"
256 " isBundle=\"false\"\n"
257 " parentFields=\"none\"\n"
258 ">\n"
259 " <Field\n"
260 " name=\"values\"\n"
261 " category=\"data\"\n"
262 " type=\"Vec3f\"\n"
263 " cardinality=\"multi\"\n"
264 " visibility=\"external\"\n"
265 " access=\"public\"\n"
266 " fieldFlags=\"FClusterLocal\"\n"
267 " >\n"
268 " </Field>\n"
269 " <Field\n"
270 " name=\"inTangentsX\"\n"
271 " category=\"data\"\n"
272 " type=\"Vec2f\"\n"
273 " cardinality=\"multi\"\n"
274 " visibility=\"external\"\n"
275 " access=\"public\"\n"
276 " fieldFlags=\"FClusterLocal\"\n"
277 " >\n"
278 " </Field>\n"
279 " <Field\n"
280 " name=\"inTangentsY\"\n"
281 " category=\"data\"\n"
282 " type=\"Vec2f\"\n"
283 " cardinality=\"multi\"\n"
284 " visibility=\"external\"\n"
285 " access=\"public\"\n"
286 " fieldFlags=\"FClusterLocal\"\n"
287 " >\n"
288 " </Field>\n"
289 " <Field\n"
290 " name=\"inTangentsZ\"\n"
291 " category=\"data\"\n"
292 " type=\"Vec2f\"\n"
293 " cardinality=\"multi\"\n"
294 " visibility=\"external\"\n"
295 " access=\"public\"\n"
296 " fieldFlags=\"FClusterLocal\"\n"
297 " >\n"
298 " </Field>\n"
299 " <Field\n"
300 " name=\"outTangentsX\"\n"
301 " category=\"data\"\n"
302 " type=\"Vec2f\"\n"
303 " cardinality=\"multi\"\n"
304 " visibility=\"external\"\n"
305 " access=\"public\"\n"
306 " fieldFlags=\"FClusterLocal\"\n"
307 " >\n"
308 " </Field>\n"
309 " <Field\n"
310 " name=\"outTangentsY\"\n"
311 " category=\"data\"\n"
312 " type=\"Vec2f\"\n"
313 " cardinality=\"multi\"\n"
314 " visibility=\"external\"\n"
315 " access=\"public\"\n"
316 " fieldFlags=\"FClusterLocal\"\n"
317 " >\n"
318 " </Field>\n"
319 " <Field\n"
320 " name=\"outTangentsZ\"\n"
321 " category=\"data\"\n"
322 " type=\"Vec2f\"\n"
323 " cardinality=\"multi\"\n"
324 " visibility=\"external\"\n"
325 " access=\"public\"\n"
326 " fieldFlags=\"FClusterLocal\"\n"
327 " >\n"
328 " </Field>\n"
329 "</FieldContainer>\n",
333 /*------------------------------ get -----------------------------------*/
335 FieldContainerType &AnimVec3fDataSourceBase::getType(void)
337 return _type;
340 const FieldContainerType &AnimVec3fDataSourceBase::getType(void) const
342 return _type;
345 UInt32 AnimVec3fDataSourceBase::getContainerSize(void) const
347 return sizeof(AnimVec3fDataSource);
350 /*------------------------- decorator get ------------------------------*/
353 MFVec3f *AnimVec3fDataSourceBase::editMFValues(void)
355 editMField(ValuesFieldMask, _mfValues);
357 return &_mfValues;
360 const MFVec3f *AnimVec3fDataSourceBase::getMFValues(void) const
362 return &_mfValues;
366 MFVec2f *AnimVec3fDataSourceBase::editMFInTangentsX(void)
368 editMField(InTangentsXFieldMask, _mfInTangentsX);
370 return &_mfInTangentsX;
373 const MFVec2f *AnimVec3fDataSourceBase::getMFInTangentsX(void) const
375 return &_mfInTangentsX;
379 MFVec2f *AnimVec3fDataSourceBase::editMFInTangentsY(void)
381 editMField(InTangentsYFieldMask, _mfInTangentsY);
383 return &_mfInTangentsY;
386 const MFVec2f *AnimVec3fDataSourceBase::getMFInTangentsY(void) const
388 return &_mfInTangentsY;
392 MFVec2f *AnimVec3fDataSourceBase::editMFInTangentsZ(void)
394 editMField(InTangentsZFieldMask, _mfInTangentsZ);
396 return &_mfInTangentsZ;
399 const MFVec2f *AnimVec3fDataSourceBase::getMFInTangentsZ(void) const
401 return &_mfInTangentsZ;
405 MFVec2f *AnimVec3fDataSourceBase::editMFOutTangentsX(void)
407 editMField(OutTangentsXFieldMask, _mfOutTangentsX);
409 return &_mfOutTangentsX;
412 const MFVec2f *AnimVec3fDataSourceBase::getMFOutTangentsX(void) const
414 return &_mfOutTangentsX;
418 MFVec2f *AnimVec3fDataSourceBase::editMFOutTangentsY(void)
420 editMField(OutTangentsYFieldMask, _mfOutTangentsY);
422 return &_mfOutTangentsY;
425 const MFVec2f *AnimVec3fDataSourceBase::getMFOutTangentsY(void) const
427 return &_mfOutTangentsY;
431 MFVec2f *AnimVec3fDataSourceBase::editMFOutTangentsZ(void)
433 editMField(OutTangentsZFieldMask, _mfOutTangentsZ);
435 return &_mfOutTangentsZ;
438 const MFVec2f *AnimVec3fDataSourceBase::getMFOutTangentsZ(void) const
440 return &_mfOutTangentsZ;
448 /*------------------------------ access -----------------------------------*/
450 SizeT AnimVec3fDataSourceBase::getBinSize(ConstFieldMaskArg whichField)
452 SizeT returnValue = Inherited::getBinSize(whichField);
454 if(FieldBits::NoField != (ValuesFieldMask & whichField))
456 returnValue += _mfValues.getBinSize();
458 if(FieldBits::NoField != (InTangentsXFieldMask & whichField))
460 returnValue += _mfInTangentsX.getBinSize();
462 if(FieldBits::NoField != (InTangentsYFieldMask & whichField))
464 returnValue += _mfInTangentsY.getBinSize();
466 if(FieldBits::NoField != (InTangentsZFieldMask & whichField))
468 returnValue += _mfInTangentsZ.getBinSize();
470 if(FieldBits::NoField != (OutTangentsXFieldMask & whichField))
472 returnValue += _mfOutTangentsX.getBinSize();
474 if(FieldBits::NoField != (OutTangentsYFieldMask & whichField))
476 returnValue += _mfOutTangentsY.getBinSize();
478 if(FieldBits::NoField != (OutTangentsZFieldMask & whichField))
480 returnValue += _mfOutTangentsZ.getBinSize();
483 return returnValue;
486 void AnimVec3fDataSourceBase::copyToBin(BinaryDataHandler &pMem,
487 ConstFieldMaskArg whichField)
489 Inherited::copyToBin(pMem, whichField);
491 if(FieldBits::NoField != (ValuesFieldMask & whichField))
493 _mfValues.copyToBin(pMem);
495 if(FieldBits::NoField != (InTangentsXFieldMask & whichField))
497 _mfInTangentsX.copyToBin(pMem);
499 if(FieldBits::NoField != (InTangentsYFieldMask & whichField))
501 _mfInTangentsY.copyToBin(pMem);
503 if(FieldBits::NoField != (InTangentsZFieldMask & whichField))
505 _mfInTangentsZ.copyToBin(pMem);
507 if(FieldBits::NoField != (OutTangentsXFieldMask & whichField))
509 _mfOutTangentsX.copyToBin(pMem);
511 if(FieldBits::NoField != (OutTangentsYFieldMask & whichField))
513 _mfOutTangentsY.copyToBin(pMem);
515 if(FieldBits::NoField != (OutTangentsZFieldMask & whichField))
517 _mfOutTangentsZ.copyToBin(pMem);
521 void AnimVec3fDataSourceBase::copyFromBin(BinaryDataHandler &pMem,
522 ConstFieldMaskArg whichField)
524 Inherited::copyFromBin(pMem, whichField);
526 if(FieldBits::NoField != (ValuesFieldMask & whichField))
528 editMField(ValuesFieldMask, _mfValues);
529 _mfValues.copyFromBin(pMem);
531 if(FieldBits::NoField != (InTangentsXFieldMask & whichField))
533 editMField(InTangentsXFieldMask, _mfInTangentsX);
534 _mfInTangentsX.copyFromBin(pMem);
536 if(FieldBits::NoField != (InTangentsYFieldMask & whichField))
538 editMField(InTangentsYFieldMask, _mfInTangentsY);
539 _mfInTangentsY.copyFromBin(pMem);
541 if(FieldBits::NoField != (InTangentsZFieldMask & whichField))
543 editMField(InTangentsZFieldMask, _mfInTangentsZ);
544 _mfInTangentsZ.copyFromBin(pMem);
546 if(FieldBits::NoField != (OutTangentsXFieldMask & whichField))
548 editMField(OutTangentsXFieldMask, _mfOutTangentsX);
549 _mfOutTangentsX.copyFromBin(pMem);
551 if(FieldBits::NoField != (OutTangentsYFieldMask & whichField))
553 editMField(OutTangentsYFieldMask, _mfOutTangentsY);
554 _mfOutTangentsY.copyFromBin(pMem);
556 if(FieldBits::NoField != (OutTangentsZFieldMask & whichField))
558 editMField(OutTangentsZFieldMask, _mfOutTangentsZ);
559 _mfOutTangentsZ.copyFromBin(pMem);
563 //! create a new instance of the class
564 AnimVec3fDataSourceTransitPtr AnimVec3fDataSourceBase::createLocal(BitVector bFlags)
566 AnimVec3fDataSourceTransitPtr fc;
568 if(getClassType().getPrototype() != NULL)
570 FieldContainerTransitPtr tmpPtr =
571 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
573 fc = dynamic_pointer_cast<AnimVec3fDataSource>(tmpPtr);
576 return fc;
579 //! create a new instance of the class, copy the container flags
580 AnimVec3fDataSourceTransitPtr AnimVec3fDataSourceBase::createDependent(BitVector bFlags)
582 AnimVec3fDataSourceTransitPtr fc;
584 if(getClassType().getPrototype() != NULL)
586 FieldContainerTransitPtr tmpPtr =
587 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
589 fc = dynamic_pointer_cast<AnimVec3fDataSource>(tmpPtr);
592 return fc;
595 //! create a new instance of the class
596 AnimVec3fDataSourceTransitPtr AnimVec3fDataSourceBase::create(void)
598 AnimVec3fDataSourceTransitPtr fc;
600 if(getClassType().getPrototype() != NULL)
602 FieldContainerTransitPtr tmpPtr =
603 getClassType().getPrototype()-> shallowCopy();
605 fc = dynamic_pointer_cast<AnimVec3fDataSource>(tmpPtr);
608 return fc;
611 AnimVec3fDataSource *AnimVec3fDataSourceBase::createEmptyLocal(BitVector bFlags)
613 AnimVec3fDataSource *returnValue;
615 newPtr<AnimVec3fDataSource>(returnValue, bFlags);
617 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
619 return returnValue;
622 //! create an empty new instance of the class, do not copy the prototype
623 AnimVec3fDataSource *AnimVec3fDataSourceBase::createEmpty(void)
625 AnimVec3fDataSource *returnValue;
627 newPtr<AnimVec3fDataSource>(returnValue, Thread::getCurrentLocalFlags());
629 returnValue->_pFieldFlags->_bNamespaceMask &=
630 ~Thread::getCurrentLocalFlags();
632 return returnValue;
636 FieldContainerTransitPtr AnimVec3fDataSourceBase::shallowCopyLocal(
637 BitVector bFlags) const
639 AnimVec3fDataSource *tmpPtr;
641 newPtr(tmpPtr, dynamic_cast<const AnimVec3fDataSource *>(this), bFlags);
643 FieldContainerTransitPtr returnValue(tmpPtr);
645 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
647 return returnValue;
650 FieldContainerTransitPtr AnimVec3fDataSourceBase::shallowCopyDependent(
651 BitVector bFlags) const
653 AnimVec3fDataSource *tmpPtr;
655 newPtr(tmpPtr, dynamic_cast<const AnimVec3fDataSource *>(this), ~bFlags);
657 FieldContainerTransitPtr returnValue(tmpPtr);
659 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
661 return returnValue;
664 FieldContainerTransitPtr AnimVec3fDataSourceBase::shallowCopy(void) const
666 AnimVec3fDataSource *tmpPtr;
668 newPtr(tmpPtr,
669 dynamic_cast<const AnimVec3fDataSource *>(this),
670 Thread::getCurrentLocalFlags());
672 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
674 FieldContainerTransitPtr returnValue(tmpPtr);
676 return returnValue;
682 /*------------------------- constructors ----------------------------------*/
684 AnimVec3fDataSourceBase::AnimVec3fDataSourceBase(void) :
685 Inherited(),
686 _mfValues (),
687 _mfInTangentsX (),
688 _mfInTangentsY (),
689 _mfInTangentsZ (),
690 _mfOutTangentsX (),
691 _mfOutTangentsY (),
692 _mfOutTangentsZ ()
696 AnimVec3fDataSourceBase::AnimVec3fDataSourceBase(const AnimVec3fDataSourceBase &source) :
697 Inherited(source),
698 _mfValues (source._mfValues ),
699 _mfInTangentsX (source._mfInTangentsX ),
700 _mfInTangentsY (source._mfInTangentsY ),
701 _mfInTangentsZ (source._mfInTangentsZ ),
702 _mfOutTangentsX (source._mfOutTangentsX ),
703 _mfOutTangentsY (source._mfOutTangentsY ),
704 _mfOutTangentsZ (source._mfOutTangentsZ )
709 /*-------------------------- destructors ----------------------------------*/
711 AnimVec3fDataSourceBase::~AnimVec3fDataSourceBase(void)
716 GetFieldHandlePtr AnimVec3fDataSourceBase::getHandleValues (void) const
718 MFVec3f::GetHandlePtr returnValue(
719 new MFVec3f::GetHandle(
720 &_mfValues,
721 this->getType().getFieldDesc(ValuesFieldId),
722 const_cast<AnimVec3fDataSourceBase *>(this)));
724 return returnValue;
727 EditFieldHandlePtr AnimVec3fDataSourceBase::editHandleValues (void)
729 MFVec3f::EditHandlePtr returnValue(
730 new MFVec3f::EditHandle(
731 &_mfValues,
732 this->getType().getFieldDesc(ValuesFieldId),
733 this));
736 editMField(ValuesFieldMask, _mfValues);
738 return returnValue;
741 GetFieldHandlePtr AnimVec3fDataSourceBase::getHandleInTangentsX (void) const
743 MFVec2f::GetHandlePtr returnValue(
744 new MFVec2f::GetHandle(
745 &_mfInTangentsX,
746 this->getType().getFieldDesc(InTangentsXFieldId),
747 const_cast<AnimVec3fDataSourceBase *>(this)));
749 return returnValue;
752 EditFieldHandlePtr AnimVec3fDataSourceBase::editHandleInTangentsX (void)
754 MFVec2f::EditHandlePtr returnValue(
755 new MFVec2f::EditHandle(
756 &_mfInTangentsX,
757 this->getType().getFieldDesc(InTangentsXFieldId),
758 this));
761 editMField(InTangentsXFieldMask, _mfInTangentsX);
763 return returnValue;
766 GetFieldHandlePtr AnimVec3fDataSourceBase::getHandleInTangentsY (void) const
768 MFVec2f::GetHandlePtr returnValue(
769 new MFVec2f::GetHandle(
770 &_mfInTangentsY,
771 this->getType().getFieldDesc(InTangentsYFieldId),
772 const_cast<AnimVec3fDataSourceBase *>(this)));
774 return returnValue;
777 EditFieldHandlePtr AnimVec3fDataSourceBase::editHandleInTangentsY (void)
779 MFVec2f::EditHandlePtr returnValue(
780 new MFVec2f::EditHandle(
781 &_mfInTangentsY,
782 this->getType().getFieldDesc(InTangentsYFieldId),
783 this));
786 editMField(InTangentsYFieldMask, _mfInTangentsY);
788 return returnValue;
791 GetFieldHandlePtr AnimVec3fDataSourceBase::getHandleInTangentsZ (void) const
793 MFVec2f::GetHandlePtr returnValue(
794 new MFVec2f::GetHandle(
795 &_mfInTangentsZ,
796 this->getType().getFieldDesc(InTangentsZFieldId),
797 const_cast<AnimVec3fDataSourceBase *>(this)));
799 return returnValue;
802 EditFieldHandlePtr AnimVec3fDataSourceBase::editHandleInTangentsZ (void)
804 MFVec2f::EditHandlePtr returnValue(
805 new MFVec2f::EditHandle(
806 &_mfInTangentsZ,
807 this->getType().getFieldDesc(InTangentsZFieldId),
808 this));
811 editMField(InTangentsZFieldMask, _mfInTangentsZ);
813 return returnValue;
816 GetFieldHandlePtr AnimVec3fDataSourceBase::getHandleOutTangentsX (void) const
818 MFVec2f::GetHandlePtr returnValue(
819 new MFVec2f::GetHandle(
820 &_mfOutTangentsX,
821 this->getType().getFieldDesc(OutTangentsXFieldId),
822 const_cast<AnimVec3fDataSourceBase *>(this)));
824 return returnValue;
827 EditFieldHandlePtr AnimVec3fDataSourceBase::editHandleOutTangentsX (void)
829 MFVec2f::EditHandlePtr returnValue(
830 new MFVec2f::EditHandle(
831 &_mfOutTangentsX,
832 this->getType().getFieldDesc(OutTangentsXFieldId),
833 this));
836 editMField(OutTangentsXFieldMask, _mfOutTangentsX);
838 return returnValue;
841 GetFieldHandlePtr AnimVec3fDataSourceBase::getHandleOutTangentsY (void) const
843 MFVec2f::GetHandlePtr returnValue(
844 new MFVec2f::GetHandle(
845 &_mfOutTangentsY,
846 this->getType().getFieldDesc(OutTangentsYFieldId),
847 const_cast<AnimVec3fDataSourceBase *>(this)));
849 return returnValue;
852 EditFieldHandlePtr AnimVec3fDataSourceBase::editHandleOutTangentsY (void)
854 MFVec2f::EditHandlePtr returnValue(
855 new MFVec2f::EditHandle(
856 &_mfOutTangentsY,
857 this->getType().getFieldDesc(OutTangentsYFieldId),
858 this));
861 editMField(OutTangentsYFieldMask, _mfOutTangentsY);
863 return returnValue;
866 GetFieldHandlePtr AnimVec3fDataSourceBase::getHandleOutTangentsZ (void) const
868 MFVec2f::GetHandlePtr returnValue(
869 new MFVec2f::GetHandle(
870 &_mfOutTangentsZ,
871 this->getType().getFieldDesc(OutTangentsZFieldId),
872 const_cast<AnimVec3fDataSourceBase *>(this)));
874 return returnValue;
877 EditFieldHandlePtr AnimVec3fDataSourceBase::editHandleOutTangentsZ (void)
879 MFVec2f::EditHandlePtr returnValue(
880 new MFVec2f::EditHandle(
881 &_mfOutTangentsZ,
882 this->getType().getFieldDesc(OutTangentsZFieldId),
883 this));
886 editMField(OutTangentsZFieldMask, _mfOutTangentsZ);
888 return returnValue;
892 #ifdef OSG_MT_CPTR_ASPECT
893 void AnimVec3fDataSourceBase::execSyncV( FieldContainer &oFrom,
894 ConstFieldMaskArg whichField,
895 AspectOffsetStore &oOffsets,
896 ConstFieldMaskArg syncMode,
897 const UInt32 uiSyncInfo)
899 AnimVec3fDataSource *pThis = static_cast<AnimVec3fDataSource *>(this);
901 pThis->execSync(static_cast<AnimVec3fDataSource *>(&oFrom),
902 whichField,
903 oOffsets,
904 syncMode,
905 uiSyncInfo);
907 #endif
910 #ifdef OSG_MT_CPTR_ASPECT
911 FieldContainer *AnimVec3fDataSourceBase::createAspectCopy(
912 const FieldContainer *pRefAspect) const
914 AnimVec3fDataSource *returnValue;
916 newAspectCopy(returnValue,
917 dynamic_cast<const AnimVec3fDataSource *>(pRefAspect),
918 dynamic_cast<const AnimVec3fDataSource *>(this));
920 return returnValue;
922 #endif
924 void AnimVec3fDataSourceBase::resolveLinks(void)
926 Inherited::resolveLinks();
928 #ifdef OSG_MT_CPTR_ASPECT
929 AspectOffsetStore oOffsets;
931 _pAspectStore->fillOffsetArray(oOffsets, this);
932 #endif
934 #ifdef OSG_MT_CPTR_ASPECT
935 _mfValues.terminateShare(Thread::getCurrentAspect(),
936 oOffsets);
937 #endif
938 #ifdef OSG_MT_CPTR_ASPECT
939 _mfInTangentsX.terminateShare(Thread::getCurrentAspect(),
940 oOffsets);
941 #endif
942 #ifdef OSG_MT_CPTR_ASPECT
943 _mfInTangentsY.terminateShare(Thread::getCurrentAspect(),
944 oOffsets);
945 #endif
946 #ifdef OSG_MT_CPTR_ASPECT
947 _mfInTangentsZ.terminateShare(Thread::getCurrentAspect(),
948 oOffsets);
949 #endif
950 #ifdef OSG_MT_CPTR_ASPECT
951 _mfOutTangentsX.terminateShare(Thread::getCurrentAspect(),
952 oOffsets);
953 #endif
954 #ifdef OSG_MT_CPTR_ASPECT
955 _mfOutTangentsY.terminateShare(Thread::getCurrentAspect(),
956 oOffsets);
957 #endif
958 #ifdef OSG_MT_CPTR_ASPECT
959 _mfOutTangentsZ.terminateShare(Thread::getCurrentAspect(),
960 oOffsets);
961 #endif
965 OSG_END_NAMESPACE