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 **
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 "OSGTimeSensorBase.h"
67 #include "OSGTimeSensor.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::TimeSensor
81 /***************************************************************************\
82 * Field Documentation *
83 \***************************************************************************/
85 /*! \var bool TimeSensorBase::_sfEnabled
89 /*! \var bool TimeSensorBase::_sfIsActive
93 /*! \var bool TimeSensorBase::_sfLoop
97 /*! \var Real32 TimeSensorBase::_sfFraction
101 /*! \var Time TimeSensorBase::_sfStartTime
105 /*! \var Time TimeSensorBase::_sfStopTime
109 /*! \var Time TimeSensorBase::_sfCycleTime
113 /*! \var Time TimeSensorBase::_sfTime
117 /*! \var Time TimeSensorBase::_sfCycleInterval
121 /*! \var Time TimeSensorBase::_sfChangeFractionBy
126 /***************************************************************************\
127 * FieldType/FieldTrait Instantiation *
128 \***************************************************************************/
130 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
131 PointerType FieldTraits
<TimeSensor
*, nsOSG
>::_type(
134 TimeSensor::getClassType(),
138 OSG_FIELDTRAITS_GETTYPE_NS(TimeSensor
*, nsOSG
)
140 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
144 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
148 /***************************************************************************\
149 * Field Description *
150 \***************************************************************************/
152 void TimeSensorBase::classDescInserter(TypeObject
&oType
)
154 Inherited::classDescInserter(oType
);
156 FieldDescriptionBase
*pDesc
= NULL
;
159 pDesc
= new SFBool::Description(
160 SFBool::getClassType(),
163 EnabledFieldId
, EnabledFieldMask
,
165 (Field::FStdAccess
| Field::FThreadLocal
),
166 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleEnabled
),
167 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleEnabled
));
169 oType
.addInitialDesc(pDesc
);
171 pDesc
= new SFBool::Description(
172 SFBool::getClassType(),
175 IsActiveFieldId
, IsActiveFieldMask
,
177 (Field::FStdAccess
| Field::FThreadLocal
),
178 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleIsActive
),
179 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleIsActive
));
181 oType
.addInitialDesc(pDesc
);
183 pDesc
= new SFBool::Description(
184 SFBool::getClassType(),
187 LoopFieldId
, LoopFieldMask
,
189 (Field::FStdAccess
| Field::FThreadLocal
),
190 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleLoop
),
191 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleLoop
));
193 oType
.addInitialDesc(pDesc
);
195 pDesc
= new SFReal32::Description(
196 SFReal32::getClassType(),
199 FractionFieldId
, FractionFieldMask
,
201 (Field::FStdAccess
| Field::FThreadLocal
),
202 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleFraction
),
203 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleFraction
));
205 oType
.addInitialDesc(pDesc
);
207 pDesc
= new SFTime::Description(
208 SFTime::getClassType(),
211 StartTimeFieldId
, StartTimeFieldMask
,
213 (Field::FStdAccess
| Field::FThreadLocal
),
214 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleStartTime
),
215 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleStartTime
));
217 oType
.addInitialDesc(pDesc
);
219 pDesc
= new SFTime::Description(
220 SFTime::getClassType(),
223 StopTimeFieldId
, StopTimeFieldMask
,
225 (Field::FStdAccess
| Field::FThreadLocal
),
226 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleStopTime
),
227 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleStopTime
));
229 oType
.addInitialDesc(pDesc
);
231 pDesc
= new SFTime::Description(
232 SFTime::getClassType(),
235 CycleTimeFieldId
, CycleTimeFieldMask
,
237 (Field::FStdAccess
| Field::FThreadLocal
),
238 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleCycleTime
),
239 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleCycleTime
));
241 oType
.addInitialDesc(pDesc
);
243 pDesc
= new SFTime::Description(
244 SFTime::getClassType(),
247 TimeFieldId
, TimeFieldMask
,
249 (Field::FStdAccess
| Field::FThreadLocal
),
250 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleTime
),
251 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleTime
));
253 oType
.addInitialDesc(pDesc
);
255 pDesc
= new SFTime::Description(
256 SFTime::getClassType(),
259 CycleIntervalFieldId
, CycleIntervalFieldMask
,
261 (Field::FStdAccess
| Field::FThreadLocal
),
262 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleCycleInterval
),
263 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleCycleInterval
));
265 oType
.addInitialDesc(pDesc
);
267 pDesc
= new SFTime::Description(
268 SFTime::getClassType(),
271 ChangeFractionByFieldId
, ChangeFractionByFieldMask
,
273 (Field::FStdAccess
| Field::FThreadLocal
),
274 static_cast<FieldEditMethodSig
>(&TimeSensor::editHandleChangeFractionBy
),
275 static_cast<FieldGetMethodSig
>(&TimeSensor::getHandleChangeFractionBy
));
277 oType
.addInitialDesc(pDesc
);
281 TimeSensorBase::TypeObject
TimeSensorBase::_type(
282 TimeSensorBase::getClassname(),
283 Inherited::getClassname(),
286 reinterpret_cast<PrototypeCreateF
>(&TimeSensorBase::createEmptyLocal
),
287 reinterpret_cast<InitContainerF
>(&TimeSensor::initMethod
),
288 reinterpret_cast<ExitContainerF
>(&TimeSensor::exitMethod
),
289 reinterpret_cast<InitalInsertDescFunc
>(
290 reinterpret_cast<void *>(&TimeSensor::classDescInserter
)),
293 "<?xml version=\"1.0\"?>\n"
296 " name=\"TimeSensor\"\n"
297 " parent=\"NodeCore\"\n"
298 " mixinparent=\"NodeCoreSensorParent\"\n"
299 " library=\"Dynamics\"\n"
300 " pointerfieldtypes=\"both\"\n"
301 " structure=\"concrete\"\n"
302 " systemcomponent=\"true\"\n"
303 " parentsystemcomponent=\"true\"\n"
304 " decoratable=\"false\"\n"
305 " useLocalIncludes=\"false\"\n"
306 " isNodeCore=\"true\"\n"
307 " isBundle=\"false\"\n"
308 " parentFields=\"none\"\n"
309 " docGroupBase=\"GrpDynamicsAnimation\"\n"
312 " name=\"enabled\"\n"
314 " cardinality=\"single\"\n"
315 " visibility=\"internal\"\n"
316 " access=\"public\"\n"
317 " defaultValue=\"true\"\n"
318 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
322 " name=\"isActive\"\n"
324 " cardinality=\"single\"\n"
325 " visibility=\"internal\"\n"
326 " access=\"public\"\n"
327 " defaultValue=\"false\"\n"
328 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
334 " cardinality=\"single\"\n"
335 " visibility=\"internal\"\n"
336 " access=\"public\"\n"
337 " defaultValue=\"false\"\n"
338 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
342 " name=\"fraction\"\n"
344 " cardinality=\"single\"\n"
345 " visibility=\"internal\"\n"
346 " access=\"public\"\n"
347 " defaultValue=\"0.0\"\n"
348 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
352 " name=\"startTime\"\n"
354 " cardinality=\"single\"\n"
355 " visibility=\"internal\"\n"
356 " access=\"public\"\n"
357 " defaultValue=\"0.0\"\n"
358 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
362 " name=\"stopTime\"\n"
364 " cardinality=\"single\"\n"
365 " visibility=\"internal\"\n"
366 " access=\"public\"\n"
367 " defaultValue=\"0.0\"\n"
368 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
372 " name=\"cycleTime\"\n"
374 " cardinality=\"single\"\n"
375 " visibility=\"internal\"\n"
376 " access=\"public\"\n"
377 " defaultValue=\"0.0\"\n"
378 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
384 " cardinality=\"single\"\n"
385 " visibility=\"internal\"\n"
386 " access=\"public\"\n"
387 " defaultValue=\"0.0\"\n"
388 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
392 " name=\"cycleInterval\"\n"
394 " cardinality=\"single\"\n"
395 " visibility=\"internal\"\n"
396 " access=\"public\"\n"
397 " defaultValue=\"1.0\"\n"
398 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
402 " name=\"changeFractionBy\"\n"
404 " cardinality=\"single\"\n"
405 " visibility=\"internal\"\n"
406 " access=\"public\"\n"
407 " fieldFlags=\"FStdAccess, FThreadLocal\"\n"
410 "</FieldContainer>\n",
414 /*------------------------------ get -----------------------------------*/
416 FieldContainerType
&TimeSensorBase::getType(void)
421 const FieldContainerType
&TimeSensorBase::getType(void) const
426 UInt32
TimeSensorBase::getContainerSize(void) const
428 return sizeof(TimeSensor
);
431 /*------------------------- decorator get ------------------------------*/
434 SFBool
*TimeSensorBase::editSFEnabled(void)
436 editSField(EnabledFieldMask
);
441 const SFBool
*TimeSensorBase::getSFEnabled(void) const
447 SFBool
*TimeSensorBase::editSFIsActive(void)
449 editSField(IsActiveFieldMask
);
454 const SFBool
*TimeSensorBase::getSFIsActive(void) const
460 SFBool
*TimeSensorBase::editSFLoop(void)
462 editSField(LoopFieldMask
);
467 const SFBool
*TimeSensorBase::getSFLoop(void) const
473 SFReal32
*TimeSensorBase::editSFFraction(void)
475 editSField(FractionFieldMask
);
480 const SFReal32
*TimeSensorBase::getSFFraction(void) const
486 SFTime
*TimeSensorBase::editSFStartTime(void)
488 editSField(StartTimeFieldMask
);
490 return &_sfStartTime
;
493 const SFTime
*TimeSensorBase::getSFStartTime(void) const
495 return &_sfStartTime
;
499 SFTime
*TimeSensorBase::editSFStopTime(void)
501 editSField(StopTimeFieldMask
);
506 const SFTime
*TimeSensorBase::getSFStopTime(void) const
512 SFTime
*TimeSensorBase::editSFCycleTime(void)
514 editSField(CycleTimeFieldMask
);
516 return &_sfCycleTime
;
519 const SFTime
*TimeSensorBase::getSFCycleTime(void) const
521 return &_sfCycleTime
;
525 SFTime
*TimeSensorBase::editSFTime(void)
527 editSField(TimeFieldMask
);
532 const SFTime
*TimeSensorBase::getSFTime(void) const
538 SFTime
*TimeSensorBase::editSFCycleInterval(void)
540 editSField(CycleIntervalFieldMask
);
542 return &_sfCycleInterval
;
545 const SFTime
*TimeSensorBase::getSFCycleInterval(void) const
547 return &_sfCycleInterval
;
551 SFTime
*TimeSensorBase::editSFChangeFractionBy(void)
553 editSField(ChangeFractionByFieldMask
);
555 return &_sfChangeFractionBy
;
558 const SFTime
*TimeSensorBase::getSFChangeFractionBy(void) const
560 return &_sfChangeFractionBy
;
568 /*------------------------------ access -----------------------------------*/
570 SizeT
TimeSensorBase::getBinSize(ConstFieldMaskArg whichField
)
572 SizeT returnValue
= Inherited::getBinSize(whichField
);
574 if(FieldBits::NoField
!= (EnabledFieldMask
& whichField
))
576 returnValue
+= _sfEnabled
.getBinSize();
578 if(FieldBits::NoField
!= (IsActiveFieldMask
& whichField
))
580 returnValue
+= _sfIsActive
.getBinSize();
582 if(FieldBits::NoField
!= (LoopFieldMask
& whichField
))
584 returnValue
+= _sfLoop
.getBinSize();
586 if(FieldBits::NoField
!= (FractionFieldMask
& whichField
))
588 returnValue
+= _sfFraction
.getBinSize();
590 if(FieldBits::NoField
!= (StartTimeFieldMask
& whichField
))
592 returnValue
+= _sfStartTime
.getBinSize();
594 if(FieldBits::NoField
!= (StopTimeFieldMask
& whichField
))
596 returnValue
+= _sfStopTime
.getBinSize();
598 if(FieldBits::NoField
!= (CycleTimeFieldMask
& whichField
))
600 returnValue
+= _sfCycleTime
.getBinSize();
602 if(FieldBits::NoField
!= (TimeFieldMask
& whichField
))
604 returnValue
+= _sfTime
.getBinSize();
606 if(FieldBits::NoField
!= (CycleIntervalFieldMask
& whichField
))
608 returnValue
+= _sfCycleInterval
.getBinSize();
610 if(FieldBits::NoField
!= (ChangeFractionByFieldMask
& whichField
))
612 returnValue
+= _sfChangeFractionBy
.getBinSize();
618 void TimeSensorBase::copyToBin(BinaryDataHandler
&pMem
,
619 ConstFieldMaskArg whichField
)
621 Inherited::copyToBin(pMem
, whichField
);
623 if(FieldBits::NoField
!= (EnabledFieldMask
& whichField
))
625 _sfEnabled
.copyToBin(pMem
);
627 if(FieldBits::NoField
!= (IsActiveFieldMask
& whichField
))
629 _sfIsActive
.copyToBin(pMem
);
631 if(FieldBits::NoField
!= (LoopFieldMask
& whichField
))
633 _sfLoop
.copyToBin(pMem
);
635 if(FieldBits::NoField
!= (FractionFieldMask
& whichField
))
637 _sfFraction
.copyToBin(pMem
);
639 if(FieldBits::NoField
!= (StartTimeFieldMask
& whichField
))
641 _sfStartTime
.copyToBin(pMem
);
643 if(FieldBits::NoField
!= (StopTimeFieldMask
& whichField
))
645 _sfStopTime
.copyToBin(pMem
);
647 if(FieldBits::NoField
!= (CycleTimeFieldMask
& whichField
))
649 _sfCycleTime
.copyToBin(pMem
);
651 if(FieldBits::NoField
!= (TimeFieldMask
& whichField
))
653 _sfTime
.copyToBin(pMem
);
655 if(FieldBits::NoField
!= (CycleIntervalFieldMask
& whichField
))
657 _sfCycleInterval
.copyToBin(pMem
);
659 if(FieldBits::NoField
!= (ChangeFractionByFieldMask
& whichField
))
661 _sfChangeFractionBy
.copyToBin(pMem
);
665 void TimeSensorBase::copyFromBin(BinaryDataHandler
&pMem
,
666 ConstFieldMaskArg whichField
)
668 Inherited::copyFromBin(pMem
, whichField
);
670 if(FieldBits::NoField
!= (EnabledFieldMask
& whichField
))
672 editSField(EnabledFieldMask
);
673 _sfEnabled
.copyFromBin(pMem
);
675 if(FieldBits::NoField
!= (IsActiveFieldMask
& whichField
))
677 editSField(IsActiveFieldMask
);
678 _sfIsActive
.copyFromBin(pMem
);
680 if(FieldBits::NoField
!= (LoopFieldMask
& whichField
))
682 editSField(LoopFieldMask
);
683 _sfLoop
.copyFromBin(pMem
);
685 if(FieldBits::NoField
!= (FractionFieldMask
& whichField
))
687 editSField(FractionFieldMask
);
688 _sfFraction
.copyFromBin(pMem
);
690 if(FieldBits::NoField
!= (StartTimeFieldMask
& whichField
))
692 editSField(StartTimeFieldMask
);
693 _sfStartTime
.copyFromBin(pMem
);
695 if(FieldBits::NoField
!= (StopTimeFieldMask
& whichField
))
697 editSField(StopTimeFieldMask
);
698 _sfStopTime
.copyFromBin(pMem
);
700 if(FieldBits::NoField
!= (CycleTimeFieldMask
& whichField
))
702 editSField(CycleTimeFieldMask
);
703 _sfCycleTime
.copyFromBin(pMem
);
705 if(FieldBits::NoField
!= (TimeFieldMask
& whichField
))
707 editSField(TimeFieldMask
);
708 _sfTime
.copyFromBin(pMem
);
710 if(FieldBits::NoField
!= (CycleIntervalFieldMask
& whichField
))
712 editSField(CycleIntervalFieldMask
);
713 _sfCycleInterval
.copyFromBin(pMem
);
715 if(FieldBits::NoField
!= (ChangeFractionByFieldMask
& whichField
))
717 editSField(ChangeFractionByFieldMask
);
718 _sfChangeFractionBy
.copyFromBin(pMem
);
722 //! create a new instance of the class
723 TimeSensorTransitPtr
TimeSensorBase::createLocal(BitVector bFlags
)
725 TimeSensorTransitPtr fc
;
727 if(getClassType().getPrototype() != NULL
)
729 FieldContainerTransitPtr tmpPtr
=
730 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
732 fc
= dynamic_pointer_cast
<TimeSensor
>(tmpPtr
);
738 //! create a new instance of the class, copy the container flags
739 TimeSensorTransitPtr
TimeSensorBase::createDependent(BitVector bFlags
)
741 TimeSensorTransitPtr fc
;
743 if(getClassType().getPrototype() != NULL
)
745 FieldContainerTransitPtr tmpPtr
=
746 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
748 fc
= dynamic_pointer_cast
<TimeSensor
>(tmpPtr
);
754 //! create a new instance of the class
755 TimeSensorTransitPtr
TimeSensorBase::create(void)
757 TimeSensorTransitPtr fc
;
759 if(getClassType().getPrototype() != NULL
)
761 FieldContainerTransitPtr tmpPtr
=
762 getClassType().getPrototype()-> shallowCopy();
764 fc
= dynamic_pointer_cast
<TimeSensor
>(tmpPtr
);
770 TimeSensor
*TimeSensorBase::createEmptyLocal(BitVector bFlags
)
772 TimeSensor
*returnValue
;
774 newPtr
<TimeSensor
>(returnValue
, bFlags
);
776 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
781 //! create an empty new instance of the class, do not copy the prototype
782 TimeSensor
*TimeSensorBase::createEmpty(void)
784 TimeSensor
*returnValue
;
786 newPtr
<TimeSensor
>(returnValue
, Thread::getCurrentLocalFlags());
788 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
789 ~Thread::getCurrentLocalFlags();
795 FieldContainerTransitPtr
TimeSensorBase::shallowCopyLocal(
796 BitVector bFlags
) const
800 newPtr(tmpPtr
, dynamic_cast<const TimeSensor
*>(this), bFlags
);
802 FieldContainerTransitPtr
returnValue(tmpPtr
);
804 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
809 FieldContainerTransitPtr
TimeSensorBase::shallowCopyDependent(
810 BitVector bFlags
) const
814 newPtr(tmpPtr
, dynamic_cast<const TimeSensor
*>(this), ~bFlags
);
816 FieldContainerTransitPtr
returnValue(tmpPtr
);
818 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
823 FieldContainerTransitPtr
TimeSensorBase::shallowCopy(void) const
828 dynamic_cast<const TimeSensor
*>(this),
829 Thread::getCurrentLocalFlags());
831 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
833 FieldContainerTransitPtr
returnValue(tmpPtr
);
841 /*------------------------- constructors ----------------------------------*/
843 TimeSensorBase::TimeSensorBase(void) :
845 _sfEnabled (bool(true)),
846 _sfIsActive (bool(false)),
847 _sfLoop (bool(false)),
848 _sfFraction (Real32(0.0)),
849 _sfStartTime (Time(0.0)),
850 _sfStopTime (Time(0.0)),
851 _sfCycleTime (Time(0.0)),
853 _sfCycleInterval (Time(1.0)),
854 _sfChangeFractionBy ()
858 TimeSensorBase::TimeSensorBase(const TimeSensorBase
&source
) :
860 _sfEnabled (source
._sfEnabled
),
861 _sfIsActive (source
._sfIsActive
),
862 _sfLoop (source
._sfLoop
),
863 _sfFraction (source
._sfFraction
),
864 _sfStartTime (source
._sfStartTime
),
865 _sfStopTime (source
._sfStopTime
),
866 _sfCycleTime (source
._sfCycleTime
),
867 _sfTime (source
._sfTime
),
868 _sfCycleInterval (source
._sfCycleInterval
),
869 _sfChangeFractionBy (source
._sfChangeFractionBy
)
874 /*-------------------------- destructors ----------------------------------*/
876 TimeSensorBase::~TimeSensorBase(void)
881 GetFieldHandlePtr
TimeSensorBase::getHandleEnabled (void) const
883 SFBool::GetHandlePtr
returnValue(
884 new SFBool::GetHandle(
886 this->getType().getFieldDesc(EnabledFieldId
),
887 const_cast<TimeSensorBase
*>(this)));
892 EditFieldHandlePtr
TimeSensorBase::editHandleEnabled (void)
894 SFBool::EditHandlePtr
returnValue(
895 new SFBool::EditHandle(
897 this->getType().getFieldDesc(EnabledFieldId
),
901 editSField(EnabledFieldMask
);
906 GetFieldHandlePtr
TimeSensorBase::getHandleIsActive (void) const
908 SFBool::GetHandlePtr
returnValue(
909 new SFBool::GetHandle(
911 this->getType().getFieldDesc(IsActiveFieldId
),
912 const_cast<TimeSensorBase
*>(this)));
917 EditFieldHandlePtr
TimeSensorBase::editHandleIsActive (void)
919 SFBool::EditHandlePtr
returnValue(
920 new SFBool::EditHandle(
922 this->getType().getFieldDesc(IsActiveFieldId
),
926 editSField(IsActiveFieldMask
);
931 GetFieldHandlePtr
TimeSensorBase::getHandleLoop (void) const
933 SFBool::GetHandlePtr
returnValue(
934 new SFBool::GetHandle(
936 this->getType().getFieldDesc(LoopFieldId
),
937 const_cast<TimeSensorBase
*>(this)));
942 EditFieldHandlePtr
TimeSensorBase::editHandleLoop (void)
944 SFBool::EditHandlePtr
returnValue(
945 new SFBool::EditHandle(
947 this->getType().getFieldDesc(LoopFieldId
),
951 editSField(LoopFieldMask
);
956 GetFieldHandlePtr
TimeSensorBase::getHandleFraction (void) const
958 SFReal32::GetHandlePtr
returnValue(
959 new SFReal32::GetHandle(
961 this->getType().getFieldDesc(FractionFieldId
),
962 const_cast<TimeSensorBase
*>(this)));
967 EditFieldHandlePtr
TimeSensorBase::editHandleFraction (void)
969 SFReal32::EditHandlePtr
returnValue(
970 new SFReal32::EditHandle(
972 this->getType().getFieldDesc(FractionFieldId
),
976 editSField(FractionFieldMask
);
981 GetFieldHandlePtr
TimeSensorBase::getHandleStartTime (void) const
983 SFTime::GetHandlePtr
returnValue(
984 new SFTime::GetHandle(
986 this->getType().getFieldDesc(StartTimeFieldId
),
987 const_cast<TimeSensorBase
*>(this)));
992 EditFieldHandlePtr
TimeSensorBase::editHandleStartTime (void)
994 SFTime::EditHandlePtr
returnValue(
995 new SFTime::EditHandle(
997 this->getType().getFieldDesc(StartTimeFieldId
),
1001 editSField(StartTimeFieldMask
);
1006 GetFieldHandlePtr
TimeSensorBase::getHandleStopTime (void) const
1008 SFTime::GetHandlePtr
returnValue(
1009 new SFTime::GetHandle(
1011 this->getType().getFieldDesc(StopTimeFieldId
),
1012 const_cast<TimeSensorBase
*>(this)));
1017 EditFieldHandlePtr
TimeSensorBase::editHandleStopTime (void)
1019 SFTime::EditHandlePtr
returnValue(
1020 new SFTime::EditHandle(
1022 this->getType().getFieldDesc(StopTimeFieldId
),
1026 editSField(StopTimeFieldMask
);
1031 GetFieldHandlePtr
TimeSensorBase::getHandleCycleTime (void) const
1033 SFTime::GetHandlePtr
returnValue(
1034 new SFTime::GetHandle(
1036 this->getType().getFieldDesc(CycleTimeFieldId
),
1037 const_cast<TimeSensorBase
*>(this)));
1042 EditFieldHandlePtr
TimeSensorBase::editHandleCycleTime (void)
1044 SFTime::EditHandlePtr
returnValue(
1045 new SFTime::EditHandle(
1047 this->getType().getFieldDesc(CycleTimeFieldId
),
1051 editSField(CycleTimeFieldMask
);
1056 GetFieldHandlePtr
TimeSensorBase::getHandleTime (void) const
1058 SFTime::GetHandlePtr
returnValue(
1059 new SFTime::GetHandle(
1061 this->getType().getFieldDesc(TimeFieldId
),
1062 const_cast<TimeSensorBase
*>(this)));
1067 EditFieldHandlePtr
TimeSensorBase::editHandleTime (void)
1069 SFTime::EditHandlePtr
returnValue(
1070 new SFTime::EditHandle(
1072 this->getType().getFieldDesc(TimeFieldId
),
1076 editSField(TimeFieldMask
);
1081 GetFieldHandlePtr
TimeSensorBase::getHandleCycleInterval (void) const
1083 SFTime::GetHandlePtr
returnValue(
1084 new SFTime::GetHandle(
1086 this->getType().getFieldDesc(CycleIntervalFieldId
),
1087 const_cast<TimeSensorBase
*>(this)));
1092 EditFieldHandlePtr
TimeSensorBase::editHandleCycleInterval (void)
1094 SFTime::EditHandlePtr
returnValue(
1095 new SFTime::EditHandle(
1097 this->getType().getFieldDesc(CycleIntervalFieldId
),
1101 editSField(CycleIntervalFieldMask
);
1106 GetFieldHandlePtr
TimeSensorBase::getHandleChangeFractionBy (void) const
1108 SFTime::GetHandlePtr
returnValue(
1109 new SFTime::GetHandle(
1110 &_sfChangeFractionBy
,
1111 this->getType().getFieldDesc(ChangeFractionByFieldId
),
1112 const_cast<TimeSensorBase
*>(this)));
1117 EditFieldHandlePtr
TimeSensorBase::editHandleChangeFractionBy(void)
1119 SFTime::EditHandlePtr
returnValue(
1120 new SFTime::EditHandle(
1121 &_sfChangeFractionBy
,
1122 this->getType().getFieldDesc(ChangeFractionByFieldId
),
1126 editSField(ChangeFractionByFieldMask
);
1132 #ifdef OSG_MT_CPTR_ASPECT
1133 void TimeSensorBase::execSyncV( FieldContainer
&oFrom
,
1134 ConstFieldMaskArg whichField
,
1135 AspectOffsetStore
&oOffsets
,
1136 ConstFieldMaskArg syncMode
,
1137 const UInt32 uiSyncInfo
)
1139 TimeSensor
*pThis
= static_cast<TimeSensor
*>(this);
1141 pThis
->execSync(static_cast<TimeSensor
*>(&oFrom
),
1150 #ifdef OSG_MT_CPTR_ASPECT
1151 FieldContainer
*TimeSensorBase::createAspectCopy(
1152 const FieldContainer
*pRefAspect
) const
1154 TimeSensor
*returnValue
;
1156 newAspectCopy(returnValue
,
1157 dynamic_cast<const TimeSensor
*>(pRefAspect
),
1158 dynamic_cast<const TimeSensor
*>(this));
1164 void TimeSensorBase::resolveLinks(void)
1166 Inherited::resolveLinks();