fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / NodeCores / Groups / Misc / OSGScreenTransformBase.cpp
blobc5aadba47ff722faa91f3bd6c9efb5e559866146
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 ScreenTransform!
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"
65 #include "OSGNode.h" // Beacon Class
67 #include "OSGScreenTransformBase.h"
68 #include "OSGScreenTransform.h"
70 #include <boost/bind.hpp>
72 OSG_BEGIN_NAMESPACE
74 /***************************************************************************\
75 * Description *
76 \***************************************************************************/
78 /*! \class OSG::ScreenTransform
82 /***************************************************************************\
83 * Field Documentation *
84 \***************************************************************************/
86 /*! \var Node * ScreenTransformBase::_sfBeacon
90 /*! \var bool ScreenTransformBase::_sfInvertWorldTransform
94 /*! \var bool ScreenTransformBase::_sfInvertViewTransform
98 /*! \var bool ScreenTransformBase::_sfApplyBeaconRotation
102 /*! \var bool ScreenTransformBase::_sfApplyBeaconScreenTranslation
106 /*! \var Matrix ScreenTransformBase::_sfView
111 /***************************************************************************\
112 * FieldType/FieldTrait Instantiation *
113 \***************************************************************************/
115 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
116 PointerType FieldTraits<ScreenTransform *, nsOSG>::_type(
117 "ScreenTransformPtr",
118 "GroupPtr",
119 ScreenTransform::getClassType(),
120 nsOSG);
121 #endif
123 OSG_FIELDTRAITS_GETTYPE_NS(ScreenTransform *, nsOSG)
125 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
126 ScreenTransform *,
127 nsOSG)
129 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
130 ScreenTransform *,
131 nsOSG)
133 /***************************************************************************\
134 * Field Description *
135 \***************************************************************************/
137 void ScreenTransformBase::classDescInserter(TypeObject &oType)
139 FieldDescriptionBase *pDesc = NULL;
142 pDesc = new SFWeakNodePtr::Description(
143 SFWeakNodePtr::getClassType(),
144 "Beacon",
146 BeaconFieldId, BeaconFieldMask,
147 false,
148 (Field::SFDefaultFlags | Field::FStdAccess),
149 static_cast<FieldEditMethodSig>(&ScreenTransform::editHandleBeacon),
150 static_cast<FieldGetMethodSig >(&ScreenTransform::getHandleBeacon));
152 oType.addInitialDesc(pDesc);
154 pDesc = new SFBool::Description(
155 SFBool::getClassType(),
156 "InvertWorldTransform",
158 InvertWorldTransformFieldId, InvertWorldTransformFieldMask,
159 false,
160 (Field::SFDefaultFlags | Field::FStdAccess),
161 static_cast<FieldEditMethodSig>(&ScreenTransform::editHandleInvertWorldTransform),
162 static_cast<FieldGetMethodSig >(&ScreenTransform::getHandleInvertWorldTransform));
164 oType.addInitialDesc(pDesc);
166 pDesc = new SFBool::Description(
167 SFBool::getClassType(),
168 "InvertViewTransform",
170 InvertViewTransformFieldId, InvertViewTransformFieldMask,
171 false,
172 (Field::SFDefaultFlags | Field::FStdAccess),
173 static_cast<FieldEditMethodSig>(&ScreenTransform::editHandleInvertViewTransform),
174 static_cast<FieldGetMethodSig >(&ScreenTransform::getHandleInvertViewTransform));
176 oType.addInitialDesc(pDesc);
178 pDesc = new SFBool::Description(
179 SFBool::getClassType(),
180 "ApplyBeaconRotation",
182 ApplyBeaconRotationFieldId, ApplyBeaconRotationFieldMask,
183 false,
184 (Field::SFDefaultFlags | Field::FStdAccess),
185 static_cast<FieldEditMethodSig>(&ScreenTransform::editHandleApplyBeaconRotation),
186 static_cast<FieldGetMethodSig >(&ScreenTransform::getHandleApplyBeaconRotation));
188 oType.addInitialDesc(pDesc);
190 pDesc = new SFBool::Description(
191 SFBool::getClassType(),
192 "ApplyBeaconScreenTranslation",
194 ApplyBeaconScreenTranslationFieldId, ApplyBeaconScreenTranslationFieldMask,
195 false,
196 (Field::SFDefaultFlags | Field::FStdAccess),
197 static_cast<FieldEditMethodSig>(&ScreenTransform::editHandleApplyBeaconScreenTranslation),
198 static_cast<FieldGetMethodSig >(&ScreenTransform::getHandleApplyBeaconScreenTranslation));
200 oType.addInitialDesc(pDesc);
202 pDesc = new SFMatrix::Description(
203 SFMatrix::getClassType(),
204 "View",
206 ViewFieldId, ViewFieldMask,
207 false,
208 (Field::SFDefaultFlags | Field::FStdAccess),
209 static_cast<FieldEditMethodSig>(&ScreenTransform::editHandleView),
210 static_cast<FieldGetMethodSig >(&ScreenTransform::getHandleView));
212 oType.addInitialDesc(pDesc);
216 ScreenTransformBase::TypeObject ScreenTransformBase::_type(
217 ScreenTransformBase::getClassname(),
218 Inherited::getClassname(),
219 "NULL",
220 nsOSG, //Namespace
221 reinterpret_cast<PrototypeCreateF>(&ScreenTransformBase::createEmptyLocal),
222 reinterpret_cast<InitContainerF>(&ScreenTransform::initMethod),
223 reinterpret_cast<ExitContainerF>(&ScreenTransform::exitMethod),
224 reinterpret_cast<InitalInsertDescFunc>(
225 reinterpret_cast<void *>(&ScreenTransform::classDescInserter)),
226 false,
228 "<?xml version=\"1.0\" ?>\n"
229 "\n"
230 "<FieldContainer\n"
231 " name=\"ScreenTransform\"\n"
232 " parent=\"Group\"\n"
233 " library=\"Group\"\n"
234 " structure=\"concrete\"\n"
235 " pointerfieldtypes=\"both\"\n"
236 " systemcomponent=\"true\"\n"
237 " parentsystemcomponent=\"true\"\n"
238 " isNodeCore=\"true\"\n"
239 " >\n"
240 " <Field\n"
241 " name=\"Beacon\"\n"
242 " type=\"Node\"\n"
243 " category=\"weakpointer\"\n"
244 " cardinality=\"single\"\n"
245 " visibility=\"external\"\n"
246 " access=\"public\"\n"
247 " >\n"
248 " </Field>\n"
249 " <Field\n"
250 " name=\"InvertWorldTransform\"\n"
251 " type=\"bool\"\n"
252 " category=\"data\"\n"
253 " cardinality=\"single\"\n"
254 " visibility=\"external\"\n"
255 " access=\"public\"\n"
256 " defaultValue=\"true\"\n"
257 " >\n"
258 " </Field>\n"
259 " <Field\n"
260 " name=\"InvertViewTransform\"\n"
261 " type=\"bool\"\n"
262 " category=\"data\"\n"
263 " cardinality=\"single\"\n"
264 " visibility=\"external\"\n"
265 " access=\"public\"\n"
266 " defaultValue=\"true\"\n"
267 " >\n"
268 " </Field>\n"
269 " <Field\n"
270 " name=\"ApplyBeaconRotation\"\n"
271 " type=\"bool\"\n"
272 " category=\"data\"\n"
273 " cardinality=\"single\"\n"
274 " visibility=\"external\"\n"
275 " access=\"public\"\n"
276 " defaultValue=\"true\"\n"
277 " >\n"
278 " </Field>\n"
279 " <Field\n"
280 " name=\"ApplyBeaconScreenTranslation\"\n"
281 " type=\"bool\"\n"
282 " category=\"data\"\n"
283 " cardinality=\"single\"\n"
284 " visibility=\"external\"\n"
285 " access=\"public\"\n"
286 " defaultValue=\"true\"\n"
287 " >\n"
288 " </Field>\n"
289 " <Field\n"
290 " name=\"View\"\n"
291 " type=\"Matrix\"\n"
292 " category=\"data\"\n"
293 " cardinality=\"single\"\n"
294 " visibility=\"external\"\n"
295 " access=\"public\"\n"
296 " defaultValue=\"1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f\"\n"
297 " >\n"
298 " </Field>\n"
299 "</FieldContainer>\n",
303 /*------------------------------ get -----------------------------------*/
305 FieldContainerType &ScreenTransformBase::getType(void)
307 return _type;
310 const FieldContainerType &ScreenTransformBase::getType(void) const
312 return _type;
315 UInt32 ScreenTransformBase::getContainerSize(void) const
317 return sizeof(ScreenTransform);
320 /*------------------------- decorator get ------------------------------*/
323 //! Get the ScreenTransform::_sfBeacon field.
324 const SFWeakNodePtr *ScreenTransformBase::getSFBeacon(void) const
326 return &_sfBeacon;
329 SFWeakNodePtr *ScreenTransformBase::editSFBeacon (void)
331 editSField(BeaconFieldMask);
333 return &_sfBeacon;
336 //! Get the value of the ScreenTransform::_sfBeacon field.
337 Node * ScreenTransformBase::getBeacon(void) const
339 return _sfBeacon.getValue();
342 //! Set the value of the ScreenTransform::_sfBeacon field.
343 void ScreenTransformBase::setBeacon(Node * const value)
345 editSField(BeaconFieldMask);
347 _sfBeacon.setValue(value);
351 SFBool *ScreenTransformBase::editSFInvertWorldTransform(void)
353 editSField(InvertWorldTransformFieldMask);
355 return &_sfInvertWorldTransform;
358 const SFBool *ScreenTransformBase::getSFInvertWorldTransform(void) const
360 return &_sfInvertWorldTransform;
364 SFBool *ScreenTransformBase::editSFInvertViewTransform(void)
366 editSField(InvertViewTransformFieldMask);
368 return &_sfInvertViewTransform;
371 const SFBool *ScreenTransformBase::getSFInvertViewTransform(void) const
373 return &_sfInvertViewTransform;
377 SFBool *ScreenTransformBase::editSFApplyBeaconRotation(void)
379 editSField(ApplyBeaconRotationFieldMask);
381 return &_sfApplyBeaconRotation;
384 const SFBool *ScreenTransformBase::getSFApplyBeaconRotation(void) const
386 return &_sfApplyBeaconRotation;
390 SFBool *ScreenTransformBase::editSFApplyBeaconScreenTranslation(void)
392 editSField(ApplyBeaconScreenTranslationFieldMask);
394 return &_sfApplyBeaconScreenTranslation;
397 const SFBool *ScreenTransformBase::getSFApplyBeaconScreenTranslation(void) const
399 return &_sfApplyBeaconScreenTranslation;
403 SFMatrix *ScreenTransformBase::editSFView(void)
405 editSField(ViewFieldMask);
407 return &_sfView;
410 const SFMatrix *ScreenTransformBase::getSFView(void) const
412 return &_sfView;
420 /*------------------------------ access -----------------------------------*/
422 SizeT ScreenTransformBase::getBinSize(ConstFieldMaskArg whichField)
424 SizeT returnValue = Inherited::getBinSize(whichField);
426 if(FieldBits::NoField != (BeaconFieldMask & whichField))
428 returnValue += _sfBeacon.getBinSize();
430 if(FieldBits::NoField != (InvertWorldTransformFieldMask & whichField))
432 returnValue += _sfInvertWorldTransform.getBinSize();
434 if(FieldBits::NoField != (InvertViewTransformFieldMask & whichField))
436 returnValue += _sfInvertViewTransform.getBinSize();
438 if(FieldBits::NoField != (ApplyBeaconRotationFieldMask & whichField))
440 returnValue += _sfApplyBeaconRotation.getBinSize();
442 if(FieldBits::NoField != (ApplyBeaconScreenTranslationFieldMask & whichField))
444 returnValue += _sfApplyBeaconScreenTranslation.getBinSize();
446 if(FieldBits::NoField != (ViewFieldMask & whichField))
448 returnValue += _sfView.getBinSize();
451 return returnValue;
454 void ScreenTransformBase::copyToBin(BinaryDataHandler &pMem,
455 ConstFieldMaskArg whichField)
457 Inherited::copyToBin(pMem, whichField);
459 if(FieldBits::NoField != (BeaconFieldMask & whichField))
461 _sfBeacon.copyToBin(pMem);
463 if(FieldBits::NoField != (InvertWorldTransformFieldMask & whichField))
465 _sfInvertWorldTransform.copyToBin(pMem);
467 if(FieldBits::NoField != (InvertViewTransformFieldMask & whichField))
469 _sfInvertViewTransform.copyToBin(pMem);
471 if(FieldBits::NoField != (ApplyBeaconRotationFieldMask & whichField))
473 _sfApplyBeaconRotation.copyToBin(pMem);
475 if(FieldBits::NoField != (ApplyBeaconScreenTranslationFieldMask & whichField))
477 _sfApplyBeaconScreenTranslation.copyToBin(pMem);
479 if(FieldBits::NoField != (ViewFieldMask & whichField))
481 _sfView.copyToBin(pMem);
485 void ScreenTransformBase::copyFromBin(BinaryDataHandler &pMem,
486 ConstFieldMaskArg whichField)
488 Inherited::copyFromBin(pMem, whichField);
490 if(FieldBits::NoField != (BeaconFieldMask & whichField))
492 editSField(BeaconFieldMask);
493 _sfBeacon.copyFromBin(pMem);
495 if(FieldBits::NoField != (InvertWorldTransformFieldMask & whichField))
497 editSField(InvertWorldTransformFieldMask);
498 _sfInvertWorldTransform.copyFromBin(pMem);
500 if(FieldBits::NoField != (InvertViewTransformFieldMask & whichField))
502 editSField(InvertViewTransformFieldMask);
503 _sfInvertViewTransform.copyFromBin(pMem);
505 if(FieldBits::NoField != (ApplyBeaconRotationFieldMask & whichField))
507 editSField(ApplyBeaconRotationFieldMask);
508 _sfApplyBeaconRotation.copyFromBin(pMem);
510 if(FieldBits::NoField != (ApplyBeaconScreenTranslationFieldMask & whichField))
512 editSField(ApplyBeaconScreenTranslationFieldMask);
513 _sfApplyBeaconScreenTranslation.copyFromBin(pMem);
515 if(FieldBits::NoField != (ViewFieldMask & whichField))
517 editSField(ViewFieldMask);
518 _sfView.copyFromBin(pMem);
522 //! create a new instance of the class
523 ScreenTransformTransitPtr ScreenTransformBase::createLocal(BitVector bFlags)
525 ScreenTransformTransitPtr fc;
527 if(getClassType().getPrototype() != NULL)
529 FieldContainerTransitPtr tmpPtr =
530 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
532 fc = dynamic_pointer_cast<ScreenTransform>(tmpPtr);
535 return fc;
538 //! create a new instance of the class, copy the container flags
539 ScreenTransformTransitPtr ScreenTransformBase::createDependent(BitVector bFlags)
541 ScreenTransformTransitPtr fc;
543 if(getClassType().getPrototype() != NULL)
545 FieldContainerTransitPtr tmpPtr =
546 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
548 fc = dynamic_pointer_cast<ScreenTransform>(tmpPtr);
551 return fc;
554 //! create a new instance of the class
555 ScreenTransformTransitPtr ScreenTransformBase::create(void)
557 ScreenTransformTransitPtr fc;
559 if(getClassType().getPrototype() != NULL)
561 FieldContainerTransitPtr tmpPtr =
562 getClassType().getPrototype()-> shallowCopy();
564 fc = dynamic_pointer_cast<ScreenTransform>(tmpPtr);
567 return fc;
570 ScreenTransform *ScreenTransformBase::createEmptyLocal(BitVector bFlags)
572 ScreenTransform *returnValue;
574 newPtr<ScreenTransform>(returnValue, bFlags);
576 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
578 return returnValue;
581 //! create an empty new instance of the class, do not copy the prototype
582 ScreenTransform *ScreenTransformBase::createEmpty(void)
584 ScreenTransform *returnValue;
586 newPtr<ScreenTransform>(returnValue, Thread::getCurrentLocalFlags());
588 returnValue->_pFieldFlags->_bNamespaceMask &=
589 ~Thread::getCurrentLocalFlags();
591 return returnValue;
595 FieldContainerTransitPtr ScreenTransformBase::shallowCopyLocal(
596 BitVector bFlags) const
598 ScreenTransform *tmpPtr;
600 newPtr(tmpPtr, dynamic_cast<const ScreenTransform *>(this), bFlags);
602 FieldContainerTransitPtr returnValue(tmpPtr);
604 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
606 return returnValue;
609 FieldContainerTransitPtr ScreenTransformBase::shallowCopyDependent(
610 BitVector bFlags) const
612 ScreenTransform *tmpPtr;
614 newPtr(tmpPtr, dynamic_cast<const ScreenTransform *>(this), ~bFlags);
616 FieldContainerTransitPtr returnValue(tmpPtr);
618 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
620 return returnValue;
623 FieldContainerTransitPtr ScreenTransformBase::shallowCopy(void) const
625 ScreenTransform *tmpPtr;
627 newPtr(tmpPtr,
628 dynamic_cast<const ScreenTransform *>(this),
629 Thread::getCurrentLocalFlags());
631 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
633 FieldContainerTransitPtr returnValue(tmpPtr);
635 return returnValue;
641 /*------------------------- constructors ----------------------------------*/
643 ScreenTransformBase::ScreenTransformBase(void) :
644 Inherited(),
645 _sfBeacon (NULL),
646 _sfInvertWorldTransform (bool(true)),
647 _sfInvertViewTransform (bool(true)),
648 _sfApplyBeaconRotation (bool(true)),
649 _sfApplyBeaconScreenTranslation(bool(true)),
650 _sfView (Matrix(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f))
654 ScreenTransformBase::ScreenTransformBase(const ScreenTransformBase &source) :
655 Inherited(source),
656 _sfBeacon (NULL),
657 _sfInvertWorldTransform (source._sfInvertWorldTransform ),
658 _sfInvertViewTransform (source._sfInvertViewTransform ),
659 _sfApplyBeaconRotation (source._sfApplyBeaconRotation ),
660 _sfApplyBeaconScreenTranslation(source._sfApplyBeaconScreenTranslation),
661 _sfView (source._sfView )
666 /*-------------------------- destructors ----------------------------------*/
668 ScreenTransformBase::~ScreenTransformBase(void)
672 void ScreenTransformBase::onCreate(const ScreenTransform *source)
674 Inherited::onCreate(source);
676 if(source != NULL)
678 ScreenTransform *pThis = static_cast<ScreenTransform *>(this);
680 pThis->setBeacon(source->getBeacon());
684 GetFieldHandlePtr ScreenTransformBase::getHandleBeacon (void) const
686 SFWeakNodePtr::GetHandlePtr returnValue(
687 new SFWeakNodePtr::GetHandle(
688 &_sfBeacon,
689 this->getType().getFieldDesc(BeaconFieldId),
690 const_cast<ScreenTransformBase *>(this)));
692 return returnValue;
695 EditFieldHandlePtr ScreenTransformBase::editHandleBeacon (void)
697 SFWeakNodePtr::EditHandlePtr returnValue(
698 new SFWeakNodePtr::EditHandle(
699 &_sfBeacon,
700 this->getType().getFieldDesc(BeaconFieldId),
701 this));
703 returnValue->setSetMethod(
704 boost::bind(&ScreenTransform::setBeacon,
705 static_cast<ScreenTransform *>(this), _1));
707 editSField(BeaconFieldMask);
709 return returnValue;
712 GetFieldHandlePtr ScreenTransformBase::getHandleInvertWorldTransform (void) const
714 SFBool::GetHandlePtr returnValue(
715 new SFBool::GetHandle(
716 &_sfInvertWorldTransform,
717 this->getType().getFieldDesc(InvertWorldTransformFieldId),
718 const_cast<ScreenTransformBase *>(this)));
720 return returnValue;
723 EditFieldHandlePtr ScreenTransformBase::editHandleInvertWorldTransform(void)
725 SFBool::EditHandlePtr returnValue(
726 new SFBool::EditHandle(
727 &_sfInvertWorldTransform,
728 this->getType().getFieldDesc(InvertWorldTransformFieldId),
729 this));
732 editSField(InvertWorldTransformFieldMask);
734 return returnValue;
737 GetFieldHandlePtr ScreenTransformBase::getHandleInvertViewTransform (void) const
739 SFBool::GetHandlePtr returnValue(
740 new SFBool::GetHandle(
741 &_sfInvertViewTransform,
742 this->getType().getFieldDesc(InvertViewTransformFieldId),
743 const_cast<ScreenTransformBase *>(this)));
745 return returnValue;
748 EditFieldHandlePtr ScreenTransformBase::editHandleInvertViewTransform(void)
750 SFBool::EditHandlePtr returnValue(
751 new SFBool::EditHandle(
752 &_sfInvertViewTransform,
753 this->getType().getFieldDesc(InvertViewTransformFieldId),
754 this));
757 editSField(InvertViewTransformFieldMask);
759 return returnValue;
762 GetFieldHandlePtr ScreenTransformBase::getHandleApplyBeaconRotation (void) const
764 SFBool::GetHandlePtr returnValue(
765 new SFBool::GetHandle(
766 &_sfApplyBeaconRotation,
767 this->getType().getFieldDesc(ApplyBeaconRotationFieldId),
768 const_cast<ScreenTransformBase *>(this)));
770 return returnValue;
773 EditFieldHandlePtr ScreenTransformBase::editHandleApplyBeaconRotation(void)
775 SFBool::EditHandlePtr returnValue(
776 new SFBool::EditHandle(
777 &_sfApplyBeaconRotation,
778 this->getType().getFieldDesc(ApplyBeaconRotationFieldId),
779 this));
782 editSField(ApplyBeaconRotationFieldMask);
784 return returnValue;
787 GetFieldHandlePtr ScreenTransformBase::getHandleApplyBeaconScreenTranslation (void) const
789 SFBool::GetHandlePtr returnValue(
790 new SFBool::GetHandle(
791 &_sfApplyBeaconScreenTranslation,
792 this->getType().getFieldDesc(ApplyBeaconScreenTranslationFieldId),
793 const_cast<ScreenTransformBase *>(this)));
795 return returnValue;
798 EditFieldHandlePtr ScreenTransformBase::editHandleApplyBeaconScreenTranslation(void)
800 SFBool::EditHandlePtr returnValue(
801 new SFBool::EditHandle(
802 &_sfApplyBeaconScreenTranslation,
803 this->getType().getFieldDesc(ApplyBeaconScreenTranslationFieldId),
804 this));
807 editSField(ApplyBeaconScreenTranslationFieldMask);
809 return returnValue;
812 GetFieldHandlePtr ScreenTransformBase::getHandleView (void) const
814 SFMatrix::GetHandlePtr returnValue(
815 new SFMatrix::GetHandle(
816 &_sfView,
817 this->getType().getFieldDesc(ViewFieldId),
818 const_cast<ScreenTransformBase *>(this)));
820 return returnValue;
823 EditFieldHandlePtr ScreenTransformBase::editHandleView (void)
825 SFMatrix::EditHandlePtr returnValue(
826 new SFMatrix::EditHandle(
827 &_sfView,
828 this->getType().getFieldDesc(ViewFieldId),
829 this));
832 editSField(ViewFieldMask);
834 return returnValue;
838 #ifdef OSG_MT_CPTR_ASPECT
839 void ScreenTransformBase::execSyncV( FieldContainer &oFrom,
840 ConstFieldMaskArg whichField,
841 AspectOffsetStore &oOffsets,
842 ConstFieldMaskArg syncMode,
843 const UInt32 uiSyncInfo)
845 ScreenTransform *pThis = static_cast<ScreenTransform *>(this);
847 pThis->execSync(static_cast<ScreenTransform *>(&oFrom),
848 whichField,
849 oOffsets,
850 syncMode,
851 uiSyncInfo);
853 #endif
856 #ifdef OSG_MT_CPTR_ASPECT
857 FieldContainer *ScreenTransformBase::createAspectCopy(
858 const FieldContainer *pRefAspect) const
860 ScreenTransform *returnValue;
862 newAspectCopy(returnValue,
863 dynamic_cast<const ScreenTransform *>(pRefAspect),
864 dynamic_cast<const ScreenTransform *>(this));
866 return returnValue;
868 #endif
870 void ScreenTransformBase::resolveLinks(void)
872 Inherited::resolveLinks();
874 static_cast<ScreenTransform *>(this)->setBeacon(NULL);
880 OSG_END_NAMESPACE