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 SkeletonOgreJoint!
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 "OSGSkeletonOgreJointBase.h"
67 #include "OSGSkeletonOgreJoint.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::SkeletonOgreJoint
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
85 /*! \var Vec3f SkeletonOgreJointBase::_sfTranslate
89 /*! \var Quaternion SkeletonOgreJointBase::_sfRotate
93 /*! \var Vec3f SkeletonOgreJointBase::_sfScale
97 /*! \var Vec3f SkeletonOgreJointBase::_sfInvBindTranslate
101 /*! \var Quaternion SkeletonOgreJointBase::_sfInvBindRotate
105 /*! \var Vec3f SkeletonOgreJointBase::_sfInvBindScale
109 /*! \var Vec3f SkeletonOgreJointBase::_sfOffsetTranslate
113 /*! \var Quaternion SkeletonOgreJointBase::_sfOffsetRotate
117 /*! \var Vec3f SkeletonOgreJointBase::_sfOffsetScale
122 /***************************************************************************\
123 * FieldType/FieldTrait Instantiation *
124 \***************************************************************************/
126 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
127 PointerType FieldTraits
<SkeletonOgreJoint
*, nsOSG
>::_type(
128 "SkeletonOgreJointPtr",
129 "BaseSkeletonJointPtr",
130 SkeletonOgreJoint::getClassType(),
134 OSG_FIELDTRAITS_GETTYPE_NS(SkeletonOgreJoint
*, nsOSG
)
136 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
140 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
144 DataType
&FieldTraits
< SkeletonOgreJoint
*, nsOSG
+ 1 >::getType(void)
146 return FieldTraits
<SkeletonOgreJoint
*, nsOSG
>::getType();
150 OSG_EXPORT_PTR_SFIELD(ChildPointerSField
,
152 UnrecordedRefCountPolicy
,
156 OSG_EXPORT_PTR_MFIELD(ChildPointerMField
,
158 UnrecordedRefCountPolicy
,
162 DataType
&FieldTraits
<SkeletonOgreJoint
*, nsOSG
+ 2 >::getType(void)
164 return FieldTraits
<SkeletonOgreJoint
*, nsOSG
>::getType();
168 OSG_SFIELDTYPE_INST(ParentPointerSField
,
173 OSG_FIELD_DLLEXPORT_DEF3(ParentPointerSField
,
179 OSG_MFIELDTYPE_INST(ParentPointerMField
,
184 OSG_FIELD_DLLEXPORT_DEF3(ParentPointerMField
,
190 /***************************************************************************\
191 * Field Description *
192 \***************************************************************************/
194 void SkeletonOgreJointBase::classDescInserter(TypeObject
&oType
)
196 FieldDescriptionBase
*pDesc
= NULL
;
199 pDesc
= new SFVec3f::Description(
200 SFVec3f::getClassType(),
203 TranslateFieldId
, TranslateFieldMask
,
205 (Field::SFDefaultFlags
| Field::FStdAccess
),
206 static_cast<FieldEditMethodSig
>(&SkeletonOgreJoint::editHandleTranslate
),
207 static_cast<FieldGetMethodSig
>(&SkeletonOgreJoint::getHandleTranslate
));
209 oType
.addInitialDesc(pDesc
);
211 pDesc
= new SFQuaternion::Description(
212 SFQuaternion::getClassType(),
215 RotateFieldId
, RotateFieldMask
,
217 (Field::SFDefaultFlags
| Field::FStdAccess
),
218 static_cast<FieldEditMethodSig
>(&SkeletonOgreJoint::editHandleRotate
),
219 static_cast<FieldGetMethodSig
>(&SkeletonOgreJoint::getHandleRotate
));
221 oType
.addInitialDesc(pDesc
);
223 pDesc
= new SFVec3f::Description(
224 SFVec3f::getClassType(),
227 ScaleFieldId
, ScaleFieldMask
,
229 (Field::SFDefaultFlags
| Field::FStdAccess
),
230 static_cast<FieldEditMethodSig
>(&SkeletonOgreJoint::editHandleScale
),
231 static_cast<FieldGetMethodSig
>(&SkeletonOgreJoint::getHandleScale
));
233 oType
.addInitialDesc(pDesc
);
235 pDesc
= new SFVec3f::Description(
236 SFVec3f::getClassType(),
239 InvBindTranslateFieldId
, InvBindTranslateFieldMask
,
241 (Field::SFDefaultFlags
| Field::FStdAccess
),
242 static_cast<FieldEditMethodSig
>(&SkeletonOgreJoint::editHandleInvBindTranslate
),
243 static_cast<FieldGetMethodSig
>(&SkeletonOgreJoint::getHandleInvBindTranslate
));
245 oType
.addInitialDesc(pDesc
);
247 pDesc
= new SFQuaternion::Description(
248 SFQuaternion::getClassType(),
251 InvBindRotateFieldId
, InvBindRotateFieldMask
,
253 (Field::SFDefaultFlags
| Field::FStdAccess
),
254 static_cast<FieldEditMethodSig
>(&SkeletonOgreJoint::editHandleInvBindRotate
),
255 static_cast<FieldGetMethodSig
>(&SkeletonOgreJoint::getHandleInvBindRotate
));
257 oType
.addInitialDesc(pDesc
);
259 pDesc
= new SFVec3f::Description(
260 SFVec3f::getClassType(),
263 InvBindScaleFieldId
, InvBindScaleFieldMask
,
265 (Field::SFDefaultFlags
| Field::FStdAccess
),
266 static_cast<FieldEditMethodSig
>(&SkeletonOgreJoint::editHandleInvBindScale
),
267 static_cast<FieldGetMethodSig
>(&SkeletonOgreJoint::getHandleInvBindScale
));
269 oType
.addInitialDesc(pDesc
);
271 pDesc
= new SFVec3f::Description(
272 SFVec3f::getClassType(),
275 OffsetTranslateFieldId
, OffsetTranslateFieldMask
,
277 (Field::SFDefaultFlags
| Field::FStdAccess
),
278 static_cast<FieldEditMethodSig
>(&SkeletonOgreJoint::editHandleOffsetTranslate
),
279 static_cast<FieldGetMethodSig
>(&SkeletonOgreJoint::getHandleOffsetTranslate
));
281 oType
.addInitialDesc(pDesc
);
283 pDesc
= new SFQuaternion::Description(
284 SFQuaternion::getClassType(),
287 OffsetRotateFieldId
, OffsetRotateFieldMask
,
289 (Field::SFDefaultFlags
| Field::FStdAccess
),
290 static_cast<FieldEditMethodSig
>(&SkeletonOgreJoint::editHandleOffsetRotate
),
291 static_cast<FieldGetMethodSig
>(&SkeletonOgreJoint::getHandleOffsetRotate
));
293 oType
.addInitialDesc(pDesc
);
295 pDesc
= new SFVec3f::Description(
296 SFVec3f::getClassType(),
299 OffsetScaleFieldId
, OffsetScaleFieldMask
,
301 (Field::SFDefaultFlags
| Field::FStdAccess
),
302 static_cast<FieldEditMethodSig
>(&SkeletonOgreJoint::editHandleOffsetScale
),
303 static_cast<FieldGetMethodSig
>(&SkeletonOgreJoint::getHandleOffsetScale
));
305 oType
.addInitialDesc(pDesc
);
309 SkeletonOgreJointBase::TypeObject
SkeletonOgreJointBase::_type(
310 SkeletonOgreJointBase::getClassname(),
311 Inherited::getClassname(),
314 reinterpret_cast<PrototypeCreateF
>(&SkeletonOgreJointBase::createEmptyLocal
),
315 reinterpret_cast<InitContainerF
>(&SkeletonOgreJoint::initMethod
),
316 reinterpret_cast<ExitContainerF
>(&SkeletonOgreJoint::exitMethod
),
317 reinterpret_cast<InitalInsertDescFunc
>(
318 reinterpret_cast<void *>(&SkeletonOgreJoint::classDescInserter
)),
321 "<?xml version=\"1.0\"?>\n"
324 " name=\"SkeletonOgreJoint\"\n"
325 " parent=\"BaseSkeletonJoint\"\n"
326 " library=\"Dynamics\"\n"
327 " pointerfieldtypes=\"both\"\n"
328 " structure=\"concrete\"\n"
329 " systemcomponent=\"true\"\n"
330 " parentsystemcomponent=\"true\"\n"
331 " decoratable=\"false\"\n"
332 " isNodeCore=\"false\"\n"
333 " childFields=\"both\"\n"
334 " parentFields=\"both\"\n"
337 " name=\"translate\"\n"
339 " category=\"data\"\n"
340 " cardinality=\"single\"\n"
341 " visibility=\"external\"\n"
342 " access=\"public\"\n"
347 " type=\"Quaternion\"\n"
348 " category=\"data\"\n"
349 " cardinality=\"single\"\n"
350 " visibility=\"external\"\n"
351 " access=\"public\"\n"
357 " category=\"data\"\n"
358 " cardinality=\"single\"\n"
359 " visibility=\"external\"\n"
360 " access=\"public\"\n"
361 " defaultValue=\"1.f, 1.f, 1.f\"\n"
366 " name=\"invBindTranslate\"\n"
368 " category=\"data\"\n"
369 " cardinality=\"single\"\n"
370 " visibility=\"external\"\n"
371 " access=\"public\"\n"
375 " name=\"invBindRotate\"\n"
376 " type=\"Quaternion\"\n"
377 " category=\"data\"\n"
378 " cardinality=\"single\"\n"
379 " visibility=\"external\"\n"
380 " access=\"public\"\n"
384 " name=\"invBindScale\"\n"
386 " category=\"data\"\n"
387 " cardinality=\"single\"\n"
388 " visibility=\"external\"\n"
389 " access=\"public\"\n"
390 " defaultValue=\"1.f, 1.f, 1.f\"\n"
395 " name=\"offsetTranslate\"\n"
397 " category=\"data\"\n"
398 " cardinality=\"single\"\n"
399 " visibility=\"external\"\n"
400 " access=\"public\"\n"
404 " name=\"offsetRotate\"\n"
405 " type=\"Quaternion\"\n"
406 " category=\"data\"\n"
407 " cardinality=\"single\"\n"
408 " visibility=\"external\"\n"
409 " access=\"public\"\n"
413 " name=\"offsetScale\"\n"
415 " category=\"data\"\n"
416 " cardinality=\"single\"\n"
417 " visibility=\"external\"\n"
418 " access=\"public\"\n"
419 " defaultValue=\"1.f, 1.f, 1.f\"\n"
422 "</FieldContainer>\n",
426 /*------------------------------ get -----------------------------------*/
428 FieldContainerType
&SkeletonOgreJointBase::getType(void)
433 const FieldContainerType
&SkeletonOgreJointBase::getType(void) const
438 UInt32
SkeletonOgreJointBase::getContainerSize(void) const
440 return sizeof(SkeletonOgreJoint
);
443 /*------------------------- decorator get ------------------------------*/
446 SFVec3f
*SkeletonOgreJointBase::editSFTranslate(void)
448 editSField(TranslateFieldMask
);
450 return &_sfTranslate
;
453 const SFVec3f
*SkeletonOgreJointBase::getSFTranslate(void) const
455 return &_sfTranslate
;
459 SFQuaternion
*SkeletonOgreJointBase::editSFRotate(void)
461 editSField(RotateFieldMask
);
466 const SFQuaternion
*SkeletonOgreJointBase::getSFRotate(void) const
472 SFVec3f
*SkeletonOgreJointBase::editSFScale(void)
474 editSField(ScaleFieldMask
);
479 const SFVec3f
*SkeletonOgreJointBase::getSFScale(void) const
485 SFVec3f
*SkeletonOgreJointBase::editSFInvBindTranslate(void)
487 editSField(InvBindTranslateFieldMask
);
489 return &_sfInvBindTranslate
;
492 const SFVec3f
*SkeletonOgreJointBase::getSFInvBindTranslate(void) const
494 return &_sfInvBindTranslate
;
498 SFQuaternion
*SkeletonOgreJointBase::editSFInvBindRotate(void)
500 editSField(InvBindRotateFieldMask
);
502 return &_sfInvBindRotate
;
505 const SFQuaternion
*SkeletonOgreJointBase::getSFInvBindRotate(void) const
507 return &_sfInvBindRotate
;
511 SFVec3f
*SkeletonOgreJointBase::editSFInvBindScale(void)
513 editSField(InvBindScaleFieldMask
);
515 return &_sfInvBindScale
;
518 const SFVec3f
*SkeletonOgreJointBase::getSFInvBindScale(void) const
520 return &_sfInvBindScale
;
524 SFVec3f
*SkeletonOgreJointBase::editSFOffsetTranslate(void)
526 editSField(OffsetTranslateFieldMask
);
528 return &_sfOffsetTranslate
;
531 const SFVec3f
*SkeletonOgreJointBase::getSFOffsetTranslate(void) const
533 return &_sfOffsetTranslate
;
537 SFQuaternion
*SkeletonOgreJointBase::editSFOffsetRotate(void)
539 editSField(OffsetRotateFieldMask
);
541 return &_sfOffsetRotate
;
544 const SFQuaternion
*SkeletonOgreJointBase::getSFOffsetRotate(void) const
546 return &_sfOffsetRotate
;
550 SFVec3f
*SkeletonOgreJointBase::editSFOffsetScale(void)
552 editSField(OffsetScaleFieldMask
);
554 return &_sfOffsetScale
;
557 const SFVec3f
*SkeletonOgreJointBase::getSFOffsetScale(void) const
559 return &_sfOffsetScale
;
567 /*------------------------------ access -----------------------------------*/
569 SizeT
SkeletonOgreJointBase::getBinSize(ConstFieldMaskArg whichField
)
571 SizeT returnValue
= Inherited::getBinSize(whichField
);
573 if(FieldBits::NoField
!= (TranslateFieldMask
& whichField
))
575 returnValue
+= _sfTranslate
.getBinSize();
577 if(FieldBits::NoField
!= (RotateFieldMask
& whichField
))
579 returnValue
+= _sfRotate
.getBinSize();
581 if(FieldBits::NoField
!= (ScaleFieldMask
& whichField
))
583 returnValue
+= _sfScale
.getBinSize();
585 if(FieldBits::NoField
!= (InvBindTranslateFieldMask
& whichField
))
587 returnValue
+= _sfInvBindTranslate
.getBinSize();
589 if(FieldBits::NoField
!= (InvBindRotateFieldMask
& whichField
))
591 returnValue
+= _sfInvBindRotate
.getBinSize();
593 if(FieldBits::NoField
!= (InvBindScaleFieldMask
& whichField
))
595 returnValue
+= _sfInvBindScale
.getBinSize();
597 if(FieldBits::NoField
!= (OffsetTranslateFieldMask
& whichField
))
599 returnValue
+= _sfOffsetTranslate
.getBinSize();
601 if(FieldBits::NoField
!= (OffsetRotateFieldMask
& whichField
))
603 returnValue
+= _sfOffsetRotate
.getBinSize();
605 if(FieldBits::NoField
!= (OffsetScaleFieldMask
& whichField
))
607 returnValue
+= _sfOffsetScale
.getBinSize();
613 void SkeletonOgreJointBase::copyToBin(BinaryDataHandler
&pMem
,
614 ConstFieldMaskArg whichField
)
616 Inherited::copyToBin(pMem
, whichField
);
618 if(FieldBits::NoField
!= (TranslateFieldMask
& whichField
))
620 _sfTranslate
.copyToBin(pMem
);
622 if(FieldBits::NoField
!= (RotateFieldMask
& whichField
))
624 _sfRotate
.copyToBin(pMem
);
626 if(FieldBits::NoField
!= (ScaleFieldMask
& whichField
))
628 _sfScale
.copyToBin(pMem
);
630 if(FieldBits::NoField
!= (InvBindTranslateFieldMask
& whichField
))
632 _sfInvBindTranslate
.copyToBin(pMem
);
634 if(FieldBits::NoField
!= (InvBindRotateFieldMask
& whichField
))
636 _sfInvBindRotate
.copyToBin(pMem
);
638 if(FieldBits::NoField
!= (InvBindScaleFieldMask
& whichField
))
640 _sfInvBindScale
.copyToBin(pMem
);
642 if(FieldBits::NoField
!= (OffsetTranslateFieldMask
& whichField
))
644 _sfOffsetTranslate
.copyToBin(pMem
);
646 if(FieldBits::NoField
!= (OffsetRotateFieldMask
& whichField
))
648 _sfOffsetRotate
.copyToBin(pMem
);
650 if(FieldBits::NoField
!= (OffsetScaleFieldMask
& whichField
))
652 _sfOffsetScale
.copyToBin(pMem
);
656 void SkeletonOgreJointBase::copyFromBin(BinaryDataHandler
&pMem
,
657 ConstFieldMaskArg whichField
)
659 Inherited::copyFromBin(pMem
, whichField
);
661 if(FieldBits::NoField
!= (TranslateFieldMask
& whichField
))
663 editSField(TranslateFieldMask
);
664 _sfTranslate
.copyFromBin(pMem
);
666 if(FieldBits::NoField
!= (RotateFieldMask
& whichField
))
668 editSField(RotateFieldMask
);
669 _sfRotate
.copyFromBin(pMem
);
671 if(FieldBits::NoField
!= (ScaleFieldMask
& whichField
))
673 editSField(ScaleFieldMask
);
674 _sfScale
.copyFromBin(pMem
);
676 if(FieldBits::NoField
!= (InvBindTranslateFieldMask
& whichField
))
678 editSField(InvBindTranslateFieldMask
);
679 _sfInvBindTranslate
.copyFromBin(pMem
);
681 if(FieldBits::NoField
!= (InvBindRotateFieldMask
& whichField
))
683 editSField(InvBindRotateFieldMask
);
684 _sfInvBindRotate
.copyFromBin(pMem
);
686 if(FieldBits::NoField
!= (InvBindScaleFieldMask
& whichField
))
688 editSField(InvBindScaleFieldMask
);
689 _sfInvBindScale
.copyFromBin(pMem
);
691 if(FieldBits::NoField
!= (OffsetTranslateFieldMask
& whichField
))
693 editSField(OffsetTranslateFieldMask
);
694 _sfOffsetTranslate
.copyFromBin(pMem
);
696 if(FieldBits::NoField
!= (OffsetRotateFieldMask
& whichField
))
698 editSField(OffsetRotateFieldMask
);
699 _sfOffsetRotate
.copyFromBin(pMem
);
701 if(FieldBits::NoField
!= (OffsetScaleFieldMask
& whichField
))
703 editSField(OffsetScaleFieldMask
);
704 _sfOffsetScale
.copyFromBin(pMem
);
708 //! create a new instance of the class
709 SkeletonOgreJointTransitPtr
SkeletonOgreJointBase::createLocal(BitVector bFlags
)
711 SkeletonOgreJointTransitPtr fc
;
713 if(getClassType().getPrototype() != NULL
)
715 FieldContainerTransitPtr tmpPtr
=
716 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
718 fc
= dynamic_pointer_cast
<SkeletonOgreJoint
>(tmpPtr
);
724 //! create a new instance of the class, copy the container flags
725 SkeletonOgreJointTransitPtr
SkeletonOgreJointBase::createDependent(BitVector bFlags
)
727 SkeletonOgreJointTransitPtr fc
;
729 if(getClassType().getPrototype() != NULL
)
731 FieldContainerTransitPtr tmpPtr
=
732 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
734 fc
= dynamic_pointer_cast
<SkeletonOgreJoint
>(tmpPtr
);
740 //! create a new instance of the class
741 SkeletonOgreJointTransitPtr
SkeletonOgreJointBase::create(void)
743 SkeletonOgreJointTransitPtr fc
;
745 if(getClassType().getPrototype() != NULL
)
747 FieldContainerTransitPtr tmpPtr
=
748 getClassType().getPrototype()-> shallowCopy();
750 fc
= dynamic_pointer_cast
<SkeletonOgreJoint
>(tmpPtr
);
756 SkeletonOgreJoint
*SkeletonOgreJointBase::createEmptyLocal(BitVector bFlags
)
758 SkeletonOgreJoint
*returnValue
;
760 newPtr
<SkeletonOgreJoint
>(returnValue
, bFlags
);
762 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
767 //! create an empty new instance of the class, do not copy the prototype
768 SkeletonOgreJoint
*SkeletonOgreJointBase::createEmpty(void)
770 SkeletonOgreJoint
*returnValue
;
772 newPtr
<SkeletonOgreJoint
>(returnValue
, Thread::getCurrentLocalFlags());
774 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
775 ~Thread::getCurrentLocalFlags();
781 FieldContainerTransitPtr
SkeletonOgreJointBase::shallowCopyLocal(
782 BitVector bFlags
) const
784 SkeletonOgreJoint
*tmpPtr
;
786 newPtr(tmpPtr
, dynamic_cast<const SkeletonOgreJoint
*>(this), bFlags
);
788 FieldContainerTransitPtr
returnValue(tmpPtr
);
790 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
795 FieldContainerTransitPtr
SkeletonOgreJointBase::shallowCopyDependent(
796 BitVector bFlags
) const
798 SkeletonOgreJoint
*tmpPtr
;
800 newPtr(tmpPtr
, dynamic_cast<const SkeletonOgreJoint
*>(this), ~bFlags
);
802 FieldContainerTransitPtr
returnValue(tmpPtr
);
804 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
809 FieldContainerTransitPtr
SkeletonOgreJointBase::shallowCopy(void) const
811 SkeletonOgreJoint
*tmpPtr
;
814 dynamic_cast<const SkeletonOgreJoint
*>(this),
815 Thread::getCurrentLocalFlags());
817 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
819 FieldContainerTransitPtr
returnValue(tmpPtr
);
827 /*------------------------- constructors ----------------------------------*/
829 SkeletonOgreJointBase::SkeletonOgreJointBase(void) :
833 _sfScale (Vec3f(1.f
, 1.f
, 1.f
)),
834 _sfInvBindTranslate (),
836 _sfInvBindScale (Vec3f(1.f
, 1.f
, 1.f
)),
837 _sfOffsetTranslate (),
839 _sfOffsetScale (Vec3f(1.f
, 1.f
, 1.f
))
843 SkeletonOgreJointBase::SkeletonOgreJointBase(const SkeletonOgreJointBase
&source
) :
845 _sfTranslate (source
._sfTranslate
),
846 _sfRotate (source
._sfRotate
),
847 _sfScale (source
._sfScale
),
848 _sfInvBindTranslate (source
._sfInvBindTranslate
),
849 _sfInvBindRotate (source
._sfInvBindRotate
),
850 _sfInvBindScale (source
._sfInvBindScale
),
851 _sfOffsetTranslate (source
._sfOffsetTranslate
),
852 _sfOffsetRotate (source
._sfOffsetRotate
),
853 _sfOffsetScale (source
._sfOffsetScale
)
858 /*-------------------------- destructors ----------------------------------*/
860 SkeletonOgreJointBase::~SkeletonOgreJointBase(void)
865 GetFieldHandlePtr
SkeletonOgreJointBase::getHandleTranslate (void) const
867 SFVec3f::GetHandlePtr
returnValue(
868 new SFVec3f::GetHandle(
870 this->getType().getFieldDesc(TranslateFieldId
),
871 const_cast<SkeletonOgreJointBase
*>(this)));
876 EditFieldHandlePtr
SkeletonOgreJointBase::editHandleTranslate (void)
878 SFVec3f::EditHandlePtr
returnValue(
879 new SFVec3f::EditHandle(
881 this->getType().getFieldDesc(TranslateFieldId
),
885 editSField(TranslateFieldMask
);
890 GetFieldHandlePtr
SkeletonOgreJointBase::getHandleRotate (void) const
892 SFQuaternion::GetHandlePtr
returnValue(
893 new SFQuaternion::GetHandle(
895 this->getType().getFieldDesc(RotateFieldId
),
896 const_cast<SkeletonOgreJointBase
*>(this)));
901 EditFieldHandlePtr
SkeletonOgreJointBase::editHandleRotate (void)
903 SFQuaternion::EditHandlePtr
returnValue(
904 new SFQuaternion::EditHandle(
906 this->getType().getFieldDesc(RotateFieldId
),
910 editSField(RotateFieldMask
);
915 GetFieldHandlePtr
SkeletonOgreJointBase::getHandleScale (void) const
917 SFVec3f::GetHandlePtr
returnValue(
918 new SFVec3f::GetHandle(
920 this->getType().getFieldDesc(ScaleFieldId
),
921 const_cast<SkeletonOgreJointBase
*>(this)));
926 EditFieldHandlePtr
SkeletonOgreJointBase::editHandleScale (void)
928 SFVec3f::EditHandlePtr
returnValue(
929 new SFVec3f::EditHandle(
931 this->getType().getFieldDesc(ScaleFieldId
),
935 editSField(ScaleFieldMask
);
940 GetFieldHandlePtr
SkeletonOgreJointBase::getHandleInvBindTranslate (void) const
942 SFVec3f::GetHandlePtr
returnValue(
943 new SFVec3f::GetHandle(
944 &_sfInvBindTranslate
,
945 this->getType().getFieldDesc(InvBindTranslateFieldId
),
946 const_cast<SkeletonOgreJointBase
*>(this)));
951 EditFieldHandlePtr
SkeletonOgreJointBase::editHandleInvBindTranslate(void)
953 SFVec3f::EditHandlePtr
returnValue(
954 new SFVec3f::EditHandle(
955 &_sfInvBindTranslate
,
956 this->getType().getFieldDesc(InvBindTranslateFieldId
),
960 editSField(InvBindTranslateFieldMask
);
965 GetFieldHandlePtr
SkeletonOgreJointBase::getHandleInvBindRotate (void) const
967 SFQuaternion::GetHandlePtr
returnValue(
968 new SFQuaternion::GetHandle(
970 this->getType().getFieldDesc(InvBindRotateFieldId
),
971 const_cast<SkeletonOgreJointBase
*>(this)));
976 EditFieldHandlePtr
SkeletonOgreJointBase::editHandleInvBindRotate (void)
978 SFQuaternion::EditHandlePtr
returnValue(
979 new SFQuaternion::EditHandle(
981 this->getType().getFieldDesc(InvBindRotateFieldId
),
985 editSField(InvBindRotateFieldMask
);
990 GetFieldHandlePtr
SkeletonOgreJointBase::getHandleInvBindScale (void) const
992 SFVec3f::GetHandlePtr
returnValue(
993 new SFVec3f::GetHandle(
995 this->getType().getFieldDesc(InvBindScaleFieldId
),
996 const_cast<SkeletonOgreJointBase
*>(this)));
1001 EditFieldHandlePtr
SkeletonOgreJointBase::editHandleInvBindScale (void)
1003 SFVec3f::EditHandlePtr
returnValue(
1004 new SFVec3f::EditHandle(
1006 this->getType().getFieldDesc(InvBindScaleFieldId
),
1010 editSField(InvBindScaleFieldMask
);
1015 GetFieldHandlePtr
SkeletonOgreJointBase::getHandleOffsetTranslate (void) const
1017 SFVec3f::GetHandlePtr
returnValue(
1018 new SFVec3f::GetHandle(
1019 &_sfOffsetTranslate
,
1020 this->getType().getFieldDesc(OffsetTranslateFieldId
),
1021 const_cast<SkeletonOgreJointBase
*>(this)));
1026 EditFieldHandlePtr
SkeletonOgreJointBase::editHandleOffsetTranslate(void)
1028 SFVec3f::EditHandlePtr
returnValue(
1029 new SFVec3f::EditHandle(
1030 &_sfOffsetTranslate
,
1031 this->getType().getFieldDesc(OffsetTranslateFieldId
),
1035 editSField(OffsetTranslateFieldMask
);
1040 GetFieldHandlePtr
SkeletonOgreJointBase::getHandleOffsetRotate (void) const
1042 SFQuaternion::GetHandlePtr
returnValue(
1043 new SFQuaternion::GetHandle(
1045 this->getType().getFieldDesc(OffsetRotateFieldId
),
1046 const_cast<SkeletonOgreJointBase
*>(this)));
1051 EditFieldHandlePtr
SkeletonOgreJointBase::editHandleOffsetRotate (void)
1053 SFQuaternion::EditHandlePtr
returnValue(
1054 new SFQuaternion::EditHandle(
1056 this->getType().getFieldDesc(OffsetRotateFieldId
),
1060 editSField(OffsetRotateFieldMask
);
1065 GetFieldHandlePtr
SkeletonOgreJointBase::getHandleOffsetScale (void) const
1067 SFVec3f::GetHandlePtr
returnValue(
1068 new SFVec3f::GetHandle(
1070 this->getType().getFieldDesc(OffsetScaleFieldId
),
1071 const_cast<SkeletonOgreJointBase
*>(this)));
1076 EditFieldHandlePtr
SkeletonOgreJointBase::editHandleOffsetScale (void)
1078 SFVec3f::EditHandlePtr
returnValue(
1079 new SFVec3f::EditHandle(
1081 this->getType().getFieldDesc(OffsetScaleFieldId
),
1085 editSField(OffsetScaleFieldMask
);
1091 #ifdef OSG_MT_CPTR_ASPECT
1092 void SkeletonOgreJointBase::execSyncV( FieldContainer
&oFrom
,
1093 ConstFieldMaskArg whichField
,
1094 AspectOffsetStore
&oOffsets
,
1095 ConstFieldMaskArg syncMode
,
1096 const UInt32 uiSyncInfo
)
1098 SkeletonOgreJoint
*pThis
= static_cast<SkeletonOgreJoint
*>(this);
1100 pThis
->execSync(static_cast<SkeletonOgreJoint
*>(&oFrom
),
1109 #ifdef OSG_MT_CPTR_ASPECT
1110 FieldContainer
*SkeletonOgreJointBase::createAspectCopy(
1111 const FieldContainer
*pRefAspect
) const
1113 SkeletonOgreJoint
*returnValue
;
1115 newAspectCopy(returnValue
,
1116 dynamic_cast<const SkeletonOgreJoint
*>(pRefAspect
),
1117 dynamic_cast<const SkeletonOgreJoint
*>(this));
1123 void SkeletonOgreJointBase::resolveLinks(void)
1125 Inherited::resolveLinks();