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 CSMSceneParameter!
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"
65 #include "OSGNode.h" // SceneRef Class
67 #include "OSGCSMSceneParameterBase.h"
68 #include "OSGCSMSceneParameter.h"
70 #include <boost/bind.hpp>
74 /***************************************************************************\
76 \***************************************************************************/
78 /*! \class OSG::CSMSceneParameter
82 /***************************************************************************\
83 * Field Documentation *
84 \***************************************************************************/
86 /*! \var Node * CSMSceneParameterBase::_sfSceneRef
90 /*! \var Real32 CSMSceneParameterBase::_sfDistScale
94 /*! \var Vec3f CSMSceneParameterBase::_sfSceneDiag
98 /*! \var Pnt3f CSMSceneParameterBase::_sfInitViewPos
102 /*! \var Pnt3f CSMSceneParameterBase::_sfSceneCenter
106 /*! \var Real32 CSMSceneParameterBase::_sfSceneNear
110 /*! \var Real32 CSMSceneParameterBase::_sfSceneFar
114 /*! \var OSGAny CSMSceneParameterBase::_sfReset
119 /***************************************************************************\
120 * FieldType/FieldTrait Instantiation *
121 \***************************************************************************/
123 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
124 PointerType FieldTraits
<CSMSceneParameter
*, nsOSG
>::_type(
125 "CSMSceneParameterPtr",
126 "AttachmentContainerPtr",
127 CSMSceneParameter::getClassType(),
131 OSG_FIELDTRAITS_GETTYPE_NS(CSMSceneParameter
*, nsOSG
)
133 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
137 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
141 /***************************************************************************\
142 * Field Description *
143 \***************************************************************************/
145 void CSMSceneParameterBase::classDescInserter(TypeObject
&oType
)
147 Inherited::classDescInserter(oType
);
149 FieldDescriptionBase
*pDesc
= NULL
;
152 pDesc
= new SFUnrecNodePtr::Description(
153 SFUnrecNodePtr::getClassType(),
156 SceneRefFieldId
, SceneRefFieldMask
,
158 (Field::SFDefaultFlags
| Field::FStdAccess
),
159 static_cast<FieldEditMethodSig
>(&CSMSceneParameter::editHandleSceneRef
),
160 static_cast<FieldGetMethodSig
>(&CSMSceneParameter::getHandleSceneRef
));
162 oType
.addInitialDesc(pDesc
);
164 pDesc
= new SFReal32::Description(
165 SFReal32::getClassType(),
168 DistScaleFieldId
, DistScaleFieldMask
,
170 (Field::SFDefaultFlags
| Field::FStdAccess
),
171 static_cast<FieldEditMethodSig
>(&CSMSceneParameter::editHandleDistScale
),
172 static_cast<FieldGetMethodSig
>(&CSMSceneParameter::getHandleDistScale
));
174 oType
.addInitialDesc(pDesc
);
176 pDesc
= new SFVec3f::Description(
177 SFVec3f::getClassType(),
180 SceneDiagFieldId
, SceneDiagFieldMask
,
182 (Field::SFDefaultFlags
| Field::FStdAccess
),
183 static_cast<FieldEditMethodSig
>(&CSMSceneParameter::editHandleSceneDiag
),
184 static_cast<FieldGetMethodSig
>(&CSMSceneParameter::getHandleSceneDiag
));
186 oType
.addInitialDesc(pDesc
);
188 pDesc
= new SFPnt3f::Description(
189 SFPnt3f::getClassType(),
192 InitViewPosFieldId
, InitViewPosFieldMask
,
194 (Field::SFDefaultFlags
| Field::FStdAccess
),
195 static_cast<FieldEditMethodSig
>(&CSMSceneParameter::editHandleInitViewPos
),
196 static_cast<FieldGetMethodSig
>(&CSMSceneParameter::getHandleInitViewPos
));
198 oType
.addInitialDesc(pDesc
);
200 pDesc
= new SFPnt3f::Description(
201 SFPnt3f::getClassType(),
204 SceneCenterFieldId
, SceneCenterFieldMask
,
206 (Field::SFDefaultFlags
| Field::FStdAccess
),
207 static_cast<FieldEditMethodSig
>(&CSMSceneParameter::editHandleSceneCenter
),
208 static_cast<FieldGetMethodSig
>(&CSMSceneParameter::getHandleSceneCenter
));
210 oType
.addInitialDesc(pDesc
);
212 pDesc
= new SFReal32::Description(
213 SFReal32::getClassType(),
216 SceneNearFieldId
, SceneNearFieldMask
,
218 (Field::SFDefaultFlags
| Field::FStdAccess
),
219 static_cast<FieldEditMethodSig
>(&CSMSceneParameter::editHandleSceneNear
),
220 static_cast<FieldGetMethodSig
>(&CSMSceneParameter::getHandleSceneNear
));
222 oType
.addInitialDesc(pDesc
);
224 pDesc
= new SFReal32::Description(
225 SFReal32::getClassType(),
228 SceneFarFieldId
, SceneFarFieldMask
,
230 (Field::SFDefaultFlags
| Field::FStdAccess
),
231 static_cast<FieldEditMethodSig
>(&CSMSceneParameter::editHandleSceneFar
),
232 static_cast<FieldGetMethodSig
>(&CSMSceneParameter::getHandleSceneFar
));
234 oType
.addInitialDesc(pDesc
);
236 pDesc
= new SFOSGAny::Description(
237 SFOSGAny::getClassType(),
240 ResetFieldId
, ResetFieldMask
,
242 (Field::SFDefaultFlags
| Field::FStdAccess
),
243 static_cast<FieldEditMethodSig
>(&CSMSceneParameter::editHandleReset
),
244 static_cast<FieldGetMethodSig
>(&CSMSceneParameter::getHandleReset
));
246 oType
.addInitialDesc(pDesc
);
250 CSMSceneParameterBase::TypeObject
CSMSceneParameterBase::_type(
251 CSMSceneParameterBase::getClassname(),
252 Inherited::getClassname(),
255 reinterpret_cast<PrototypeCreateF
>(&CSMSceneParameterBase::createEmptyLocal
),
256 reinterpret_cast<InitContainerF
>(&CSMSceneParameter::initMethod
),
257 reinterpret_cast<ExitContainerF
>(&CSMSceneParameter::exitMethod
),
258 reinterpret_cast<InitalInsertDescFunc
>(
259 reinterpret_cast<void *>(&CSMSceneParameter::classDescInserter
)),
262 "<?xml version=\"1.0\"?>\n"
265 " name=\"CSMSceneParameter\"\n"
266 " parent=\"AttachmentContainer\"\n"
267 " mixinparent=\"AttachmentContainerFrameTaskParent\"\n"
268 " library=\"ContribCSM\"\n"
269 " pointerfieldtypes=\"both\"\n"
270 " structure=\"concrete\"\n"
271 " systemcomponent=\"true\"\n"
272 " parentsystemcomponent=\"true\"\n"
273 " decoratable=\"false\"\n"
274 " useLocalIncludes=\"false\"\n"
275 " isNodeCore=\"false\"\n"
276 " isBundle=\"true\"\n"
279 "\t\tname=\"sceneRef\"\n"
280 "\t\ttype=\"Node\"\n"
281 "\t\tcardinality=\"single\"\n"
282 "\t\tvisibility=\"external\"\n"
283 " defaultValue=\"NULL\"\n"
284 "\t\taccess=\"public\"\n"
285 " category=\"pointer\"\n"
289 "\t\tname=\"distScale\"\n"
290 "\t\ttype=\"Real32\"\n"
291 "\t\tcardinality=\"single\"\n"
292 "\t\tvisibility=\"external\"\n"
293 " defaultValue=\"1.f\"\n"
297 "\t\tname=\"sceneDiag\"\n"
298 "\t\ttype=\"Vec3f\"\n"
299 "\t\tcardinality=\"single\"\n"
300 "\t\tvisibility=\"external\"\n"
301 " defaultValue=\"1.f\"\n"
305 "\t\tname=\"initViewPos\"\n"
306 "\t\ttype=\"Pnt3f\"\n"
307 "\t\tcardinality=\"single\"\n"
308 "\t\tvisibility=\"external\"\n"
309 " defaultValue=\"1.f\"\n"
313 "\t\tname=\"sceneCenter\"\n"
314 "\t\ttype=\"Pnt3f\"\n"
315 "\t\tcardinality=\"single\"\n"
316 "\t\tvisibility=\"external\"\n"
317 " defaultValue=\"1.f\"\n"
321 "\t\tname=\"sceneNear\"\n"
322 "\t\ttype=\"Real32\"\n"
323 "\t\tcardinality=\"single\"\n"
324 "\t\tvisibility=\"external\"\n"
325 " defaultValue=\"0.1f\"\n"
329 "\t\tname=\"sceneFar\"\n"
330 "\t\ttype=\"Real32\"\n"
331 "\t\tcardinality=\"single\"\n"
332 "\t\tvisibility=\"external\"\n"
333 " defaultValue=\"20000.f\"\n"
338 "\t\tname=\"reset\"\n"
339 "\t\ttype=\"OSGAny\"\n"
340 "\t\tcardinality=\"single\"\n"
341 "\t\tvisibility=\"internal\"\n"
342 " defaultValue=\"\"\n"
346 "</FieldContainer>\n",
350 /*------------------------------ get -----------------------------------*/
352 FieldContainerType
&CSMSceneParameterBase::getType(void)
357 const FieldContainerType
&CSMSceneParameterBase::getType(void) const
362 UInt32
CSMSceneParameterBase::getContainerSize(void) const
364 return sizeof(CSMSceneParameter
);
367 /*------------------------- decorator get ------------------------------*/
370 //! Get the CSMSceneParameter::_sfSceneRef field.
371 const SFUnrecNodePtr
*CSMSceneParameterBase::getSFSceneRef(void) const
376 SFUnrecNodePtr
*CSMSceneParameterBase::editSFSceneRef (void)
378 editSField(SceneRefFieldMask
);
383 //! Get the value of the CSMSceneParameter::_sfSceneRef field.
384 Node
* CSMSceneParameterBase::getSceneRef(void) const
386 return _sfSceneRef
.getValue();
389 //! Set the value of the CSMSceneParameter::_sfSceneRef field.
390 void CSMSceneParameterBase::setSceneRef(Node
* const value
)
392 editSField(SceneRefFieldMask
);
394 _sfSceneRef
.setValue(value
);
398 SFReal32
*CSMSceneParameterBase::editSFDistScale(void)
400 editSField(DistScaleFieldMask
);
402 return &_sfDistScale
;
405 const SFReal32
*CSMSceneParameterBase::getSFDistScale(void) const
407 return &_sfDistScale
;
411 SFVec3f
*CSMSceneParameterBase::editSFSceneDiag(void)
413 editSField(SceneDiagFieldMask
);
415 return &_sfSceneDiag
;
418 const SFVec3f
*CSMSceneParameterBase::getSFSceneDiag(void) const
420 return &_sfSceneDiag
;
424 SFPnt3f
*CSMSceneParameterBase::editSFInitViewPos(void)
426 editSField(InitViewPosFieldMask
);
428 return &_sfInitViewPos
;
431 const SFPnt3f
*CSMSceneParameterBase::getSFInitViewPos(void) const
433 return &_sfInitViewPos
;
437 SFPnt3f
*CSMSceneParameterBase::editSFSceneCenter(void)
439 editSField(SceneCenterFieldMask
);
441 return &_sfSceneCenter
;
444 const SFPnt3f
*CSMSceneParameterBase::getSFSceneCenter(void) const
446 return &_sfSceneCenter
;
450 SFReal32
*CSMSceneParameterBase::editSFSceneNear(void)
452 editSField(SceneNearFieldMask
);
454 return &_sfSceneNear
;
457 const SFReal32
*CSMSceneParameterBase::getSFSceneNear(void) const
459 return &_sfSceneNear
;
463 SFReal32
*CSMSceneParameterBase::editSFSceneFar(void)
465 editSField(SceneFarFieldMask
);
470 const SFReal32
*CSMSceneParameterBase::getSFSceneFar(void) const
476 SFOSGAny
*CSMSceneParameterBase::editSFReset(void)
478 editSField(ResetFieldMask
);
483 const SFOSGAny
*CSMSceneParameterBase::getSFReset(void) const
493 /*------------------------------ access -----------------------------------*/
495 SizeT
CSMSceneParameterBase::getBinSize(ConstFieldMaskArg whichField
)
497 SizeT returnValue
= Inherited::getBinSize(whichField
);
499 if(FieldBits::NoField
!= (SceneRefFieldMask
& whichField
))
501 returnValue
+= _sfSceneRef
.getBinSize();
503 if(FieldBits::NoField
!= (DistScaleFieldMask
& whichField
))
505 returnValue
+= _sfDistScale
.getBinSize();
507 if(FieldBits::NoField
!= (SceneDiagFieldMask
& whichField
))
509 returnValue
+= _sfSceneDiag
.getBinSize();
511 if(FieldBits::NoField
!= (InitViewPosFieldMask
& whichField
))
513 returnValue
+= _sfInitViewPos
.getBinSize();
515 if(FieldBits::NoField
!= (SceneCenterFieldMask
& whichField
))
517 returnValue
+= _sfSceneCenter
.getBinSize();
519 if(FieldBits::NoField
!= (SceneNearFieldMask
& whichField
))
521 returnValue
+= _sfSceneNear
.getBinSize();
523 if(FieldBits::NoField
!= (SceneFarFieldMask
& whichField
))
525 returnValue
+= _sfSceneFar
.getBinSize();
527 if(FieldBits::NoField
!= (ResetFieldMask
& whichField
))
529 returnValue
+= _sfReset
.getBinSize();
535 void CSMSceneParameterBase::copyToBin(BinaryDataHandler
&pMem
,
536 ConstFieldMaskArg whichField
)
538 Inherited::copyToBin(pMem
, whichField
);
540 if(FieldBits::NoField
!= (SceneRefFieldMask
& whichField
))
542 _sfSceneRef
.copyToBin(pMem
);
544 if(FieldBits::NoField
!= (DistScaleFieldMask
& whichField
))
546 _sfDistScale
.copyToBin(pMem
);
548 if(FieldBits::NoField
!= (SceneDiagFieldMask
& whichField
))
550 _sfSceneDiag
.copyToBin(pMem
);
552 if(FieldBits::NoField
!= (InitViewPosFieldMask
& whichField
))
554 _sfInitViewPos
.copyToBin(pMem
);
556 if(FieldBits::NoField
!= (SceneCenterFieldMask
& whichField
))
558 _sfSceneCenter
.copyToBin(pMem
);
560 if(FieldBits::NoField
!= (SceneNearFieldMask
& whichField
))
562 _sfSceneNear
.copyToBin(pMem
);
564 if(FieldBits::NoField
!= (SceneFarFieldMask
& whichField
))
566 _sfSceneFar
.copyToBin(pMem
);
568 if(FieldBits::NoField
!= (ResetFieldMask
& whichField
))
570 _sfReset
.copyToBin(pMem
);
574 void CSMSceneParameterBase::copyFromBin(BinaryDataHandler
&pMem
,
575 ConstFieldMaskArg whichField
)
577 Inherited::copyFromBin(pMem
, whichField
);
579 if(FieldBits::NoField
!= (SceneRefFieldMask
& whichField
))
581 editSField(SceneRefFieldMask
);
582 _sfSceneRef
.copyFromBin(pMem
);
584 if(FieldBits::NoField
!= (DistScaleFieldMask
& whichField
))
586 editSField(DistScaleFieldMask
);
587 _sfDistScale
.copyFromBin(pMem
);
589 if(FieldBits::NoField
!= (SceneDiagFieldMask
& whichField
))
591 editSField(SceneDiagFieldMask
);
592 _sfSceneDiag
.copyFromBin(pMem
);
594 if(FieldBits::NoField
!= (InitViewPosFieldMask
& whichField
))
596 editSField(InitViewPosFieldMask
);
597 _sfInitViewPos
.copyFromBin(pMem
);
599 if(FieldBits::NoField
!= (SceneCenterFieldMask
& whichField
))
601 editSField(SceneCenterFieldMask
);
602 _sfSceneCenter
.copyFromBin(pMem
);
604 if(FieldBits::NoField
!= (SceneNearFieldMask
& whichField
))
606 editSField(SceneNearFieldMask
);
607 _sfSceneNear
.copyFromBin(pMem
);
609 if(FieldBits::NoField
!= (SceneFarFieldMask
& whichField
))
611 editSField(SceneFarFieldMask
);
612 _sfSceneFar
.copyFromBin(pMem
);
614 if(FieldBits::NoField
!= (ResetFieldMask
& whichField
))
616 editSField(ResetFieldMask
);
617 _sfReset
.copyFromBin(pMem
);
621 //! create a new instance of the class
622 CSMSceneParameterTransitPtr
CSMSceneParameterBase::createLocal(BitVector bFlags
)
624 CSMSceneParameterTransitPtr fc
;
626 if(getClassType().getPrototype() != NULL
)
628 FieldContainerTransitPtr tmpPtr
=
629 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
631 fc
= dynamic_pointer_cast
<CSMSceneParameter
>(tmpPtr
);
637 //! create a new instance of the class, copy the container flags
638 CSMSceneParameterTransitPtr
CSMSceneParameterBase::createDependent(BitVector bFlags
)
640 CSMSceneParameterTransitPtr fc
;
642 if(getClassType().getPrototype() != NULL
)
644 FieldContainerTransitPtr tmpPtr
=
645 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
647 fc
= dynamic_pointer_cast
<CSMSceneParameter
>(tmpPtr
);
653 //! create a new instance of the class
654 CSMSceneParameterTransitPtr
CSMSceneParameterBase::create(void)
656 return createLocal();
659 CSMSceneParameter
*CSMSceneParameterBase::createEmptyLocal(BitVector bFlags
)
661 CSMSceneParameter
*returnValue
;
663 newPtr
<CSMSceneParameter
>(returnValue
, bFlags
);
665 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
670 //! create an empty new instance of the class, do not copy the prototype
671 CSMSceneParameter
*CSMSceneParameterBase::createEmpty(void)
673 return createEmptyLocal();
677 FieldContainerTransitPtr
CSMSceneParameterBase::shallowCopyLocal(
678 BitVector bFlags
) const
680 CSMSceneParameter
*tmpPtr
;
682 newPtr(tmpPtr
, dynamic_cast<const CSMSceneParameter
*>(this), bFlags
);
684 FieldContainerTransitPtr
returnValue(tmpPtr
);
686 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
691 FieldContainerTransitPtr
CSMSceneParameterBase::shallowCopyDependent(
692 BitVector bFlags
) const
694 CSMSceneParameter
*tmpPtr
;
696 newPtr(tmpPtr
, dynamic_cast<const CSMSceneParameter
*>(this), ~bFlags
);
698 FieldContainerTransitPtr
returnValue(tmpPtr
);
700 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
705 FieldContainerTransitPtr
CSMSceneParameterBase::shallowCopy(void) const
707 return shallowCopyLocal();
713 /*------------------------- constructors ----------------------------------*/
715 CSMSceneParameterBase::CSMSceneParameterBase(void) :
718 _sfDistScale (Real32(1.f
)),
719 _sfSceneDiag (Vec3f(1.f
)),
720 _sfInitViewPos (Pnt3f(1.f
)),
721 _sfSceneCenter (Pnt3f(1.f
)),
722 _sfSceneNear (Real32(0.1f
)),
723 _sfSceneFar (Real32(20000.f
)),
728 CSMSceneParameterBase::CSMSceneParameterBase(const CSMSceneParameterBase
&source
) :
731 _sfDistScale (source
._sfDistScale
),
732 _sfSceneDiag (source
._sfSceneDiag
),
733 _sfInitViewPos (source
._sfInitViewPos
),
734 _sfSceneCenter (source
._sfSceneCenter
),
735 _sfSceneNear (source
._sfSceneNear
),
736 _sfSceneFar (source
._sfSceneFar
),
737 _sfReset (source
._sfReset
)
742 /*-------------------------- destructors ----------------------------------*/
744 CSMSceneParameterBase::~CSMSceneParameterBase(void)
748 void CSMSceneParameterBase::onCreate(const CSMSceneParameter
*source
)
750 Inherited::onCreate(source
);
754 CSMSceneParameter
*pThis
= static_cast<CSMSceneParameter
*>(this);
756 pThis
->setSceneRef(source
->getSceneRef());
760 GetFieldHandlePtr
CSMSceneParameterBase::getHandleSceneRef (void) const
762 SFUnrecNodePtr::GetHandlePtr
returnValue(
763 new SFUnrecNodePtr::GetHandle(
765 this->getType().getFieldDesc(SceneRefFieldId
),
766 const_cast<CSMSceneParameterBase
*>(this)));
771 EditFieldHandlePtr
CSMSceneParameterBase::editHandleSceneRef (void)
773 SFUnrecNodePtr::EditHandlePtr
returnValue(
774 new SFUnrecNodePtr::EditHandle(
776 this->getType().getFieldDesc(SceneRefFieldId
),
779 returnValue
->setSetMethod(
780 boost::bind(&CSMSceneParameter::setSceneRef
,
781 static_cast<CSMSceneParameter
*>(this), _1
));
783 editSField(SceneRefFieldMask
);
788 GetFieldHandlePtr
CSMSceneParameterBase::getHandleDistScale (void) const
790 SFReal32::GetHandlePtr
returnValue(
791 new SFReal32::GetHandle(
793 this->getType().getFieldDesc(DistScaleFieldId
),
794 const_cast<CSMSceneParameterBase
*>(this)));
799 EditFieldHandlePtr
CSMSceneParameterBase::editHandleDistScale (void)
801 SFReal32::EditHandlePtr
returnValue(
802 new SFReal32::EditHandle(
804 this->getType().getFieldDesc(DistScaleFieldId
),
808 editSField(DistScaleFieldMask
);
813 GetFieldHandlePtr
CSMSceneParameterBase::getHandleSceneDiag (void) const
815 SFVec3f::GetHandlePtr
returnValue(
816 new SFVec3f::GetHandle(
818 this->getType().getFieldDesc(SceneDiagFieldId
),
819 const_cast<CSMSceneParameterBase
*>(this)));
824 EditFieldHandlePtr
CSMSceneParameterBase::editHandleSceneDiag (void)
826 SFVec3f::EditHandlePtr
returnValue(
827 new SFVec3f::EditHandle(
829 this->getType().getFieldDesc(SceneDiagFieldId
),
833 editSField(SceneDiagFieldMask
);
838 GetFieldHandlePtr
CSMSceneParameterBase::getHandleInitViewPos (void) const
840 SFPnt3f::GetHandlePtr
returnValue(
841 new SFPnt3f::GetHandle(
843 this->getType().getFieldDesc(InitViewPosFieldId
),
844 const_cast<CSMSceneParameterBase
*>(this)));
849 EditFieldHandlePtr
CSMSceneParameterBase::editHandleInitViewPos (void)
851 SFPnt3f::EditHandlePtr
returnValue(
852 new SFPnt3f::EditHandle(
854 this->getType().getFieldDesc(InitViewPosFieldId
),
858 editSField(InitViewPosFieldMask
);
863 GetFieldHandlePtr
CSMSceneParameterBase::getHandleSceneCenter (void) const
865 SFPnt3f::GetHandlePtr
returnValue(
866 new SFPnt3f::GetHandle(
868 this->getType().getFieldDesc(SceneCenterFieldId
),
869 const_cast<CSMSceneParameterBase
*>(this)));
874 EditFieldHandlePtr
CSMSceneParameterBase::editHandleSceneCenter (void)
876 SFPnt3f::EditHandlePtr
returnValue(
877 new SFPnt3f::EditHandle(
879 this->getType().getFieldDesc(SceneCenterFieldId
),
883 editSField(SceneCenterFieldMask
);
888 GetFieldHandlePtr
CSMSceneParameterBase::getHandleSceneNear (void) const
890 SFReal32::GetHandlePtr
returnValue(
891 new SFReal32::GetHandle(
893 this->getType().getFieldDesc(SceneNearFieldId
),
894 const_cast<CSMSceneParameterBase
*>(this)));
899 EditFieldHandlePtr
CSMSceneParameterBase::editHandleSceneNear (void)
901 SFReal32::EditHandlePtr
returnValue(
902 new SFReal32::EditHandle(
904 this->getType().getFieldDesc(SceneNearFieldId
),
908 editSField(SceneNearFieldMask
);
913 GetFieldHandlePtr
CSMSceneParameterBase::getHandleSceneFar (void) const
915 SFReal32::GetHandlePtr
returnValue(
916 new SFReal32::GetHandle(
918 this->getType().getFieldDesc(SceneFarFieldId
),
919 const_cast<CSMSceneParameterBase
*>(this)));
924 EditFieldHandlePtr
CSMSceneParameterBase::editHandleSceneFar (void)
926 SFReal32::EditHandlePtr
returnValue(
927 new SFReal32::EditHandle(
929 this->getType().getFieldDesc(SceneFarFieldId
),
933 editSField(SceneFarFieldMask
);
938 GetFieldHandlePtr
CSMSceneParameterBase::getHandleReset (void) const
940 SFOSGAny::GetHandlePtr
returnValue(
941 new SFOSGAny::GetHandle(
943 this->getType().getFieldDesc(ResetFieldId
),
944 const_cast<CSMSceneParameterBase
*>(this)));
949 EditFieldHandlePtr
CSMSceneParameterBase::editHandleReset (void)
951 SFOSGAny::EditHandlePtr
returnValue(
952 new SFOSGAny::EditHandle(
954 this->getType().getFieldDesc(ResetFieldId
),
958 editSField(ResetFieldMask
);
964 #ifdef OSG_MT_CPTR_ASPECT
965 void CSMSceneParameterBase::execSyncV( FieldContainer
&oFrom
,
966 ConstFieldMaskArg whichField
,
967 AspectOffsetStore
&oOffsets
,
968 ConstFieldMaskArg syncMode
,
969 const UInt32 uiSyncInfo
)
971 CSMSceneParameter
*pThis
= static_cast<CSMSceneParameter
*>(this);
973 pThis
->execSync(static_cast<CSMSceneParameter
*>(&oFrom
),
982 #ifdef OSG_MT_CPTR_ASPECT
983 FieldContainer
*CSMSceneParameterBase::createAspectCopy(
984 const FieldContainer
*pRefAspect
) const
986 CSMSceneParameter
*returnValue
;
988 newAspectCopy(returnValue
,
989 dynamic_cast<const CSMSceneParameter
*>(pRefAspect
),
990 dynamic_cast<const CSMSceneParameter
*>(this));
996 void CSMSceneParameterBase::resolveLinks(void)
998 Inherited::resolveLinks();
1000 static_cast<CSMSceneParameter
*>(this)->setSceneRef(NULL
);