changed: gcc8 base update
[opensg.git] / Source / System / Dynamics / Skeleton / OSGSkeletonOgreJointBase.cpp
blob58d04d0d7bcc905ba7f76e86d2a05cf3e5da900c
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 SkeletonOgreJoint!
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 "OSGSkeletonOgreJointBase.h"
67 #include "OSGSkeletonOgreJoint.h"
69 #include <boost/bind.hpp>
71 OSG_BEGIN_NAMESPACE
73 /***************************************************************************\
74 * Description *
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(),
131 nsOSG);
132 #endif
134 OSG_FIELDTRAITS_GETTYPE_NS(SkeletonOgreJoint *, nsOSG)
136 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
137 SkeletonOgreJoint *,
138 nsOSG)
140 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
141 SkeletonOgreJoint *,
142 nsOSG)
144 DataType &FieldTraits< SkeletonOgreJoint *, nsOSG + 1 >::getType(void)
146 return FieldTraits<SkeletonOgreJoint *, nsOSG>::getType();
150 OSG_EXPORT_PTR_SFIELD(ChildPointerSField,
151 SkeletonOgreJoint *,
152 UnrecordedRefCountPolicy,
153 nsOSG + 1)
156 OSG_EXPORT_PTR_MFIELD(ChildPointerMField,
157 SkeletonOgreJoint *,
158 UnrecordedRefCountPolicy,
159 nsOSG + 1)
162 DataType &FieldTraits<SkeletonOgreJoint *, nsOSG + 2 >::getType(void)
164 return FieldTraits<SkeletonOgreJoint *, nsOSG>::getType();
168 OSG_SFIELDTYPE_INST(ParentPointerSField,
169 SkeletonOgreJoint *,
170 NoRefCountPolicy,
171 nsOSG + 2);
173 OSG_FIELD_DLLEXPORT_DEF3(ParentPointerSField,
174 SkeletonOgreJoint *,
175 NoRefCountPolicy,
176 nsOSG + 2)
179 OSG_MFIELDTYPE_INST(ParentPointerMField,
180 SkeletonOgreJoint *,
181 NoRefCountPolicy,
184 OSG_FIELD_DLLEXPORT_DEF3(ParentPointerMField,
185 SkeletonOgreJoint *,
186 NoRefCountPolicy,
190 /***************************************************************************\
191 * Field Description *
192 \***************************************************************************/
194 void SkeletonOgreJointBase::classDescInserter(TypeObject &oType)
196 FieldDescriptionBase *pDesc = NULL;
199 pDesc = new SFVec3f::Description(
200 SFVec3f::getClassType(),
201 "translate",
203 TranslateFieldId, TranslateFieldMask,
204 false,
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(),
213 "rotate",
215 RotateFieldId, RotateFieldMask,
216 false,
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(),
225 "scale",
227 ScaleFieldId, ScaleFieldMask,
228 false,
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(),
237 "invBindTranslate",
239 InvBindTranslateFieldId, InvBindTranslateFieldMask,
240 false,
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(),
249 "invBindRotate",
251 InvBindRotateFieldId, InvBindRotateFieldMask,
252 false,
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(),
261 "invBindScale",
263 InvBindScaleFieldId, InvBindScaleFieldMask,
264 false,
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(),
273 "offsetTranslate",
275 OffsetTranslateFieldId, OffsetTranslateFieldMask,
276 false,
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(),
285 "offsetRotate",
287 OffsetRotateFieldId, OffsetRotateFieldMask,
288 false,
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(),
297 "offsetScale",
299 OffsetScaleFieldId, OffsetScaleFieldMask,
300 false,
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(),
312 "NULL",
313 nsOSG, //Namespace
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)),
319 false,
321 "<?xml version=\"1.0\"?>\n"
322 "\n"
323 "<FieldContainer\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"
335 ">\n"
336 " <Field\n"
337 " name=\"translate\"\n"
338 " type=\"Vec3f\"\n"
339 " category=\"data\"\n"
340 " cardinality=\"single\"\n"
341 " visibility=\"external\"\n"
342 " access=\"public\"\n"
343 " >\n"
344 " </Field>\n"
345 " <Field\n"
346 " name=\"rotate\"\n"
347 " type=\"Quaternion\"\n"
348 " category=\"data\"\n"
349 " cardinality=\"single\"\n"
350 " visibility=\"external\"\n"
351 " access=\"public\"\n"
352 " >\n"
353 " </Field>\n"
354 " <Field\n"
355 " name=\"scale\"\n"
356 " type=\"Vec3f\"\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"
362 " >\n"
363 " </Field>\n"
364 "\n"
365 " <Field\n"
366 " name=\"invBindTranslate\"\n"
367 " type=\"Vec3f\"\n"
368 " category=\"data\"\n"
369 " cardinality=\"single\"\n"
370 " visibility=\"external\"\n"
371 " access=\"public\"\n"
372 " >\n"
373 " </Field>\n"
374 " <Field\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"
381 " >\n"
382 " </Field>\n"
383 " <Field\n"
384 " name=\"invBindScale\"\n"
385 " type=\"Vec3f\"\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"
391 " >\n"
392 " </Field>\n"
393 "\n"
394 " <Field\n"
395 " name=\"offsetTranslate\"\n"
396 " type=\"Vec3f\"\n"
397 " category=\"data\"\n"
398 " cardinality=\"single\"\n"
399 " visibility=\"external\"\n"
400 " access=\"public\"\n"
401 " >\n"
402 " </Field>\n"
403 " <Field\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"
410 " >\n"
411 " </Field>\n"
412 " <Field\n"
413 " name=\"offsetScale\"\n"
414 " type=\"Vec3f\"\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"
420 " >\n"
421 " </Field>\n"
422 "</FieldContainer>\n",
426 /*------------------------------ get -----------------------------------*/
428 FieldContainerType &SkeletonOgreJointBase::getType(void)
430 return _type;
433 const FieldContainerType &SkeletonOgreJointBase::getType(void) const
435 return _type;
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);
463 return &_sfRotate;
466 const SFQuaternion *SkeletonOgreJointBase::getSFRotate(void) const
468 return &_sfRotate;
472 SFVec3f *SkeletonOgreJointBase::editSFScale(void)
474 editSField(ScaleFieldMask);
476 return &_sfScale;
479 const SFVec3f *SkeletonOgreJointBase::getSFScale(void) const
481 return &_sfScale;
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();
610 return returnValue;
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);
721 return fc;
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);
737 return fc;
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);
753 return fc;
756 SkeletonOgreJoint *SkeletonOgreJointBase::createEmptyLocal(BitVector bFlags)
758 SkeletonOgreJoint *returnValue;
760 newPtr<SkeletonOgreJoint>(returnValue, bFlags);
762 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
764 return returnValue;
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();
777 return returnValue;
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;
792 return returnValue;
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;
806 return returnValue;
809 FieldContainerTransitPtr SkeletonOgreJointBase::shallowCopy(void) const
811 SkeletonOgreJoint *tmpPtr;
813 newPtr(tmpPtr,
814 dynamic_cast<const SkeletonOgreJoint *>(this),
815 Thread::getCurrentLocalFlags());
817 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
819 FieldContainerTransitPtr returnValue(tmpPtr);
821 return returnValue;
827 /*------------------------- constructors ----------------------------------*/
829 SkeletonOgreJointBase::SkeletonOgreJointBase(void) :
830 Inherited(),
831 _sfTranslate (),
832 _sfRotate (),
833 _sfScale (Vec3f(1.f, 1.f, 1.f)),
834 _sfInvBindTranslate (),
835 _sfInvBindRotate (),
836 _sfInvBindScale (Vec3f(1.f, 1.f, 1.f)),
837 _sfOffsetTranslate (),
838 _sfOffsetRotate (),
839 _sfOffsetScale (Vec3f(1.f, 1.f, 1.f))
843 SkeletonOgreJointBase::SkeletonOgreJointBase(const SkeletonOgreJointBase &source) :
844 Inherited(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(
869 &_sfTranslate,
870 this->getType().getFieldDesc(TranslateFieldId),
871 const_cast<SkeletonOgreJointBase *>(this)));
873 return returnValue;
876 EditFieldHandlePtr SkeletonOgreJointBase::editHandleTranslate (void)
878 SFVec3f::EditHandlePtr returnValue(
879 new SFVec3f::EditHandle(
880 &_sfTranslate,
881 this->getType().getFieldDesc(TranslateFieldId),
882 this));
885 editSField(TranslateFieldMask);
887 return returnValue;
890 GetFieldHandlePtr SkeletonOgreJointBase::getHandleRotate (void) const
892 SFQuaternion::GetHandlePtr returnValue(
893 new SFQuaternion::GetHandle(
894 &_sfRotate,
895 this->getType().getFieldDesc(RotateFieldId),
896 const_cast<SkeletonOgreJointBase *>(this)));
898 return returnValue;
901 EditFieldHandlePtr SkeletonOgreJointBase::editHandleRotate (void)
903 SFQuaternion::EditHandlePtr returnValue(
904 new SFQuaternion::EditHandle(
905 &_sfRotate,
906 this->getType().getFieldDesc(RotateFieldId),
907 this));
910 editSField(RotateFieldMask);
912 return returnValue;
915 GetFieldHandlePtr SkeletonOgreJointBase::getHandleScale (void) const
917 SFVec3f::GetHandlePtr returnValue(
918 new SFVec3f::GetHandle(
919 &_sfScale,
920 this->getType().getFieldDesc(ScaleFieldId),
921 const_cast<SkeletonOgreJointBase *>(this)));
923 return returnValue;
926 EditFieldHandlePtr SkeletonOgreJointBase::editHandleScale (void)
928 SFVec3f::EditHandlePtr returnValue(
929 new SFVec3f::EditHandle(
930 &_sfScale,
931 this->getType().getFieldDesc(ScaleFieldId),
932 this));
935 editSField(ScaleFieldMask);
937 return returnValue;
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)));
948 return returnValue;
951 EditFieldHandlePtr SkeletonOgreJointBase::editHandleInvBindTranslate(void)
953 SFVec3f::EditHandlePtr returnValue(
954 new SFVec3f::EditHandle(
955 &_sfInvBindTranslate,
956 this->getType().getFieldDesc(InvBindTranslateFieldId),
957 this));
960 editSField(InvBindTranslateFieldMask);
962 return returnValue;
965 GetFieldHandlePtr SkeletonOgreJointBase::getHandleInvBindRotate (void) const
967 SFQuaternion::GetHandlePtr returnValue(
968 new SFQuaternion::GetHandle(
969 &_sfInvBindRotate,
970 this->getType().getFieldDesc(InvBindRotateFieldId),
971 const_cast<SkeletonOgreJointBase *>(this)));
973 return returnValue;
976 EditFieldHandlePtr SkeletonOgreJointBase::editHandleInvBindRotate (void)
978 SFQuaternion::EditHandlePtr returnValue(
979 new SFQuaternion::EditHandle(
980 &_sfInvBindRotate,
981 this->getType().getFieldDesc(InvBindRotateFieldId),
982 this));
985 editSField(InvBindRotateFieldMask);
987 return returnValue;
990 GetFieldHandlePtr SkeletonOgreJointBase::getHandleInvBindScale (void) const
992 SFVec3f::GetHandlePtr returnValue(
993 new SFVec3f::GetHandle(
994 &_sfInvBindScale,
995 this->getType().getFieldDesc(InvBindScaleFieldId),
996 const_cast<SkeletonOgreJointBase *>(this)));
998 return returnValue;
1001 EditFieldHandlePtr SkeletonOgreJointBase::editHandleInvBindScale (void)
1003 SFVec3f::EditHandlePtr returnValue(
1004 new SFVec3f::EditHandle(
1005 &_sfInvBindScale,
1006 this->getType().getFieldDesc(InvBindScaleFieldId),
1007 this));
1010 editSField(InvBindScaleFieldMask);
1012 return returnValue;
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)));
1023 return returnValue;
1026 EditFieldHandlePtr SkeletonOgreJointBase::editHandleOffsetTranslate(void)
1028 SFVec3f::EditHandlePtr returnValue(
1029 new SFVec3f::EditHandle(
1030 &_sfOffsetTranslate,
1031 this->getType().getFieldDesc(OffsetTranslateFieldId),
1032 this));
1035 editSField(OffsetTranslateFieldMask);
1037 return returnValue;
1040 GetFieldHandlePtr SkeletonOgreJointBase::getHandleOffsetRotate (void) const
1042 SFQuaternion::GetHandlePtr returnValue(
1043 new SFQuaternion::GetHandle(
1044 &_sfOffsetRotate,
1045 this->getType().getFieldDesc(OffsetRotateFieldId),
1046 const_cast<SkeletonOgreJointBase *>(this)));
1048 return returnValue;
1051 EditFieldHandlePtr SkeletonOgreJointBase::editHandleOffsetRotate (void)
1053 SFQuaternion::EditHandlePtr returnValue(
1054 new SFQuaternion::EditHandle(
1055 &_sfOffsetRotate,
1056 this->getType().getFieldDesc(OffsetRotateFieldId),
1057 this));
1060 editSField(OffsetRotateFieldMask);
1062 return returnValue;
1065 GetFieldHandlePtr SkeletonOgreJointBase::getHandleOffsetScale (void) const
1067 SFVec3f::GetHandlePtr returnValue(
1068 new SFVec3f::GetHandle(
1069 &_sfOffsetScale,
1070 this->getType().getFieldDesc(OffsetScaleFieldId),
1071 const_cast<SkeletonOgreJointBase *>(this)));
1073 return returnValue;
1076 EditFieldHandlePtr SkeletonOgreJointBase::editHandleOffsetScale (void)
1078 SFVec3f::EditHandlePtr returnValue(
1079 new SFVec3f::EditHandle(
1080 &_sfOffsetScale,
1081 this->getType().getFieldDesc(OffsetScaleFieldId),
1082 this));
1085 editSField(OffsetScaleFieldMask);
1087 return returnValue;
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),
1101 whichField,
1102 oOffsets,
1103 syncMode,
1104 uiSyncInfo);
1106 #endif
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));
1119 return returnValue;
1121 #endif
1123 void SkeletonOgreJointBase::resolveLinks(void)
1125 Inherited::resolveLinks();
1131 OSG_END_NAMESPACE