changed: gcc8 base update
[opensg.git] / Source / Contrib / ComplexSceneManager / OSGCSMSceneParameterBase.cpp
blobefeef5eb8a6800cf6aa34297387f9b43583daf3d
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 CSMSceneParameter!
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" // SceneRef Class
67 #include "OSGCSMSceneParameterBase.h"
68 #include "OSGCSMSceneParameter.h"
70 #include <boost/bind.hpp>
72 OSG_BEGIN_NAMESPACE
74 /***************************************************************************\
75 * Description *
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(),
128 nsOSG);
129 #endif
131 OSG_FIELDTRAITS_GETTYPE_NS(CSMSceneParameter *, nsOSG)
133 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
134 CSMSceneParameter *,
135 nsOSG)
137 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
138 CSMSceneParameter *,
139 nsOSG)
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(),
154 "sceneRef",
156 SceneRefFieldId, SceneRefFieldMask,
157 false,
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(),
166 "distScale",
168 DistScaleFieldId, DistScaleFieldMask,
169 false,
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(),
178 "sceneDiag",
180 SceneDiagFieldId, SceneDiagFieldMask,
181 false,
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(),
190 "initViewPos",
192 InitViewPosFieldId, InitViewPosFieldMask,
193 false,
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(),
202 "sceneCenter",
204 SceneCenterFieldId, SceneCenterFieldMask,
205 false,
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(),
214 "sceneNear",
216 SceneNearFieldId, SceneNearFieldMask,
217 false,
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(),
226 "sceneFar",
228 SceneFarFieldId, SceneFarFieldMask,
229 false,
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(),
238 "reset",
240 ResetFieldId, ResetFieldMask,
241 true,
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(),
253 "NULL",
254 nsOSG, //Namespace
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)),
260 false,
262 "<?xml version=\"1.0\"?>\n"
263 "\n"
264 "<FieldContainer\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"
277 " >\n"
278 "\t<Field\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"
286 "\t>\n"
287 "\t</Field>\n"
288 "\t<Field\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"
294 "\t>\n"
295 "\t</Field>\n"
296 "\t<Field\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"
302 "\t>\n"
303 "\t</Field>\n"
304 "\t<Field\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"
310 "\t>\n"
311 "\t</Field>\n"
312 "\t<Field\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"
318 "\t>\n"
319 "\t</Field>\n"
320 "\t<Field\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"
326 "\t>\n"
327 "\t</Field>\n"
328 "\t<Field\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"
334 "\t>\n"
335 "\t</Field>\n"
336 "\n"
337 "\t<Field\n"
338 "\t\tname=\"reset\"\n"
339 "\t\ttype=\"OSGAny\"\n"
340 "\t\tcardinality=\"single\"\n"
341 "\t\tvisibility=\"internal\"\n"
342 " defaultValue=\"\"\n"
343 "\t>\n"
344 "\t</Field>\n"
345 "\n"
346 "</FieldContainer>\n",
350 /*------------------------------ get -----------------------------------*/
352 FieldContainerType &CSMSceneParameterBase::getType(void)
354 return _type;
357 const FieldContainerType &CSMSceneParameterBase::getType(void) const
359 return _type;
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
373 return &_sfSceneRef;
376 SFUnrecNodePtr *CSMSceneParameterBase::editSFSceneRef (void)
378 editSField(SceneRefFieldMask);
380 return &_sfSceneRef;
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);
467 return &_sfSceneFar;
470 const SFReal32 *CSMSceneParameterBase::getSFSceneFar(void) const
472 return &_sfSceneFar;
476 SFOSGAny *CSMSceneParameterBase::editSFReset(void)
478 editSField(ResetFieldMask);
480 return &_sfReset;
483 const SFOSGAny *CSMSceneParameterBase::getSFReset(void) const
485 return &_sfReset;
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();
532 return returnValue;
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);
634 return fc;
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);
650 return fc;
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;
667 return returnValue;
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;
688 return returnValue;
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;
702 return returnValue;
705 FieldContainerTransitPtr CSMSceneParameterBase::shallowCopy(void) const
707 return shallowCopyLocal();
713 /*------------------------- constructors ----------------------------------*/
715 CSMSceneParameterBase::CSMSceneParameterBase(void) :
716 Inherited(),
717 _sfSceneRef (NULL),
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)),
724 _sfReset ()
728 CSMSceneParameterBase::CSMSceneParameterBase(const CSMSceneParameterBase &source) :
729 Inherited(source),
730 _sfSceneRef (NULL),
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);
752 if(source != NULL)
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(
764 &_sfSceneRef,
765 this->getType().getFieldDesc(SceneRefFieldId),
766 const_cast<CSMSceneParameterBase *>(this)));
768 return returnValue;
771 EditFieldHandlePtr CSMSceneParameterBase::editHandleSceneRef (void)
773 SFUnrecNodePtr::EditHandlePtr returnValue(
774 new SFUnrecNodePtr::EditHandle(
775 &_sfSceneRef,
776 this->getType().getFieldDesc(SceneRefFieldId),
777 this));
779 returnValue->setSetMethod(
780 boost::bind(&CSMSceneParameter::setSceneRef,
781 static_cast<CSMSceneParameter *>(this), _1));
783 editSField(SceneRefFieldMask);
785 return returnValue;
788 GetFieldHandlePtr CSMSceneParameterBase::getHandleDistScale (void) const
790 SFReal32::GetHandlePtr returnValue(
791 new SFReal32::GetHandle(
792 &_sfDistScale,
793 this->getType().getFieldDesc(DistScaleFieldId),
794 const_cast<CSMSceneParameterBase *>(this)));
796 return returnValue;
799 EditFieldHandlePtr CSMSceneParameterBase::editHandleDistScale (void)
801 SFReal32::EditHandlePtr returnValue(
802 new SFReal32::EditHandle(
803 &_sfDistScale,
804 this->getType().getFieldDesc(DistScaleFieldId),
805 this));
808 editSField(DistScaleFieldMask);
810 return returnValue;
813 GetFieldHandlePtr CSMSceneParameterBase::getHandleSceneDiag (void) const
815 SFVec3f::GetHandlePtr returnValue(
816 new SFVec3f::GetHandle(
817 &_sfSceneDiag,
818 this->getType().getFieldDesc(SceneDiagFieldId),
819 const_cast<CSMSceneParameterBase *>(this)));
821 return returnValue;
824 EditFieldHandlePtr CSMSceneParameterBase::editHandleSceneDiag (void)
826 SFVec3f::EditHandlePtr returnValue(
827 new SFVec3f::EditHandle(
828 &_sfSceneDiag,
829 this->getType().getFieldDesc(SceneDiagFieldId),
830 this));
833 editSField(SceneDiagFieldMask);
835 return returnValue;
838 GetFieldHandlePtr CSMSceneParameterBase::getHandleInitViewPos (void) const
840 SFPnt3f::GetHandlePtr returnValue(
841 new SFPnt3f::GetHandle(
842 &_sfInitViewPos,
843 this->getType().getFieldDesc(InitViewPosFieldId),
844 const_cast<CSMSceneParameterBase *>(this)));
846 return returnValue;
849 EditFieldHandlePtr CSMSceneParameterBase::editHandleInitViewPos (void)
851 SFPnt3f::EditHandlePtr returnValue(
852 new SFPnt3f::EditHandle(
853 &_sfInitViewPos,
854 this->getType().getFieldDesc(InitViewPosFieldId),
855 this));
858 editSField(InitViewPosFieldMask);
860 return returnValue;
863 GetFieldHandlePtr CSMSceneParameterBase::getHandleSceneCenter (void) const
865 SFPnt3f::GetHandlePtr returnValue(
866 new SFPnt3f::GetHandle(
867 &_sfSceneCenter,
868 this->getType().getFieldDesc(SceneCenterFieldId),
869 const_cast<CSMSceneParameterBase *>(this)));
871 return returnValue;
874 EditFieldHandlePtr CSMSceneParameterBase::editHandleSceneCenter (void)
876 SFPnt3f::EditHandlePtr returnValue(
877 new SFPnt3f::EditHandle(
878 &_sfSceneCenter,
879 this->getType().getFieldDesc(SceneCenterFieldId),
880 this));
883 editSField(SceneCenterFieldMask);
885 return returnValue;
888 GetFieldHandlePtr CSMSceneParameterBase::getHandleSceneNear (void) const
890 SFReal32::GetHandlePtr returnValue(
891 new SFReal32::GetHandle(
892 &_sfSceneNear,
893 this->getType().getFieldDesc(SceneNearFieldId),
894 const_cast<CSMSceneParameterBase *>(this)));
896 return returnValue;
899 EditFieldHandlePtr CSMSceneParameterBase::editHandleSceneNear (void)
901 SFReal32::EditHandlePtr returnValue(
902 new SFReal32::EditHandle(
903 &_sfSceneNear,
904 this->getType().getFieldDesc(SceneNearFieldId),
905 this));
908 editSField(SceneNearFieldMask);
910 return returnValue;
913 GetFieldHandlePtr CSMSceneParameterBase::getHandleSceneFar (void) const
915 SFReal32::GetHandlePtr returnValue(
916 new SFReal32::GetHandle(
917 &_sfSceneFar,
918 this->getType().getFieldDesc(SceneFarFieldId),
919 const_cast<CSMSceneParameterBase *>(this)));
921 return returnValue;
924 EditFieldHandlePtr CSMSceneParameterBase::editHandleSceneFar (void)
926 SFReal32::EditHandlePtr returnValue(
927 new SFReal32::EditHandle(
928 &_sfSceneFar,
929 this->getType().getFieldDesc(SceneFarFieldId),
930 this));
933 editSField(SceneFarFieldMask);
935 return returnValue;
938 GetFieldHandlePtr CSMSceneParameterBase::getHandleReset (void) const
940 SFOSGAny::GetHandlePtr returnValue(
941 new SFOSGAny::GetHandle(
942 &_sfReset,
943 this->getType().getFieldDesc(ResetFieldId),
944 const_cast<CSMSceneParameterBase *>(this)));
946 return returnValue;
949 EditFieldHandlePtr CSMSceneParameterBase::editHandleReset (void)
951 SFOSGAny::EditHandlePtr returnValue(
952 new SFOSGAny::EditHandle(
953 &_sfReset,
954 this->getType().getFieldDesc(ResetFieldId),
955 this));
958 editSField(ResetFieldMask);
960 return returnValue;
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),
974 whichField,
975 oOffsets,
976 syncMode,
977 uiSyncInfo);
979 #endif
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));
992 return returnValue;
994 #endif
996 void CSMSceneParameterBase::resolveLinks(void)
998 Inherited::resolveLinks();
1000 static_cast<CSMSceneParameter *>(this)->setSceneRef(NULL);
1006 OSG_END_NAMESPACE