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 ProjectionCameraDecorator!
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" // User Class
67 #include "OSGProjectionCameraDecoratorBase.h"
68 #include "OSGProjectionCameraDecorator.h"
70 #include <boost/bind.hpp>
74 /***************************************************************************\
76 \***************************************************************************/
78 /*! \class OSG::ProjectionCameraDecorator
79 The decorator for tracked projection screens, see \ref
80 PageSystemWindowCameraDecoratorsStereoProjection for a description.
82 The parameters are defined by the _sfUser and _mfSurface fields.
86 The derived parameters used to actually calculate the matrix are stored in the
87 _sfLeft, _sfBottom, _sfNormal, sfWidth and _sfHeight fields.
92 /***************************************************************************\
93 * Field Documentation *
94 \***************************************************************************/
96 /*! \var Node * ProjectionCameraDecoratorBase::_sfUser
97 The coordinate system relative to the camera.
100 /*! \var Pnt3f ProjectionCameraDecoratorBase::_mfSurface
101 4 points describing the rectangular projection surface, in the camera
102 coordinate system. Counterclockwise, starting at lower left corner of the
106 /*! \var Plane ProjectionCameraDecoratorBase::_sfLeft
107 The left edge direction vector.
110 /*! \var Plane ProjectionCameraDecoratorBase::_sfBottom
111 The bottom edge direction vector.
114 /*! \var Plane ProjectionCameraDecoratorBase::_sfNormal
115 The normal of the projection surface.
118 /*! \var Real32 ProjectionCameraDecoratorBase::_sfWidth
119 The width of the projection screen.
122 /*! \var Real32 ProjectionCameraDecoratorBase::_sfHeight
123 The height of the projection screen.
127 /***************************************************************************\
128 * FieldType/FieldTrait Instantiation *
129 \***************************************************************************/
131 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
132 PointerType FieldTraits
<ProjectionCameraDecorator
*, nsOSG
>::_type(
133 "ProjectionCameraDecoratorPtr",
134 "StereoCameraDecoratorPtr",
135 ProjectionCameraDecorator::getClassType(),
139 OSG_FIELDTRAITS_GETTYPE_NS(ProjectionCameraDecorator
*, nsOSG
)
141 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
142 ProjectionCameraDecorator
*,
145 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
146 ProjectionCameraDecorator
*,
149 /***************************************************************************\
150 * Field Description *
151 \***************************************************************************/
153 void ProjectionCameraDecoratorBase::classDescInserter(TypeObject
&oType
)
155 FieldDescriptionBase
*pDesc
= NULL
;
158 pDesc
= new SFUnrecNodePtr::Description(
159 SFUnrecNodePtr::getClassType(),
161 "The coordinate system relative to the camera.\n",
162 UserFieldId
, UserFieldMask
,
164 (Field::SFDefaultFlags
| Field::FStdAccess
),
165 static_cast<FieldEditMethodSig
>(&ProjectionCameraDecorator::editHandleUser
),
166 static_cast<FieldGetMethodSig
>(&ProjectionCameraDecorator::getHandleUser
));
168 oType
.addInitialDesc(pDesc
);
170 pDesc
= new MFPnt3f::Description(
171 MFPnt3f::getClassType(),
173 "4 points describing the rectangular projection surface, in the camera\n"
174 "coordinate system. Counterclockwise, starting at lower left corner of the\n"
176 SurfaceFieldId
, SurfaceFieldMask
,
178 (Field::MFDefaultFlags
| Field::FStdAccess
),
179 static_cast<FieldEditMethodSig
>(&ProjectionCameraDecorator::editHandleSurface
),
180 static_cast<FieldGetMethodSig
>(&ProjectionCameraDecorator::getHandleSurface
));
182 oType
.addInitialDesc(pDesc
);
184 pDesc
= new SFPlane::Description(
185 SFPlane::getClassType(),
187 "The left edge direction vector.\n",
188 LeftFieldId
, LeftFieldMask
,
190 (Field::SFDefaultFlags
| Field::FStdAccess
),
191 static_cast<FieldEditMethodSig
>(&ProjectionCameraDecorator::editHandleLeft
),
192 static_cast<FieldGetMethodSig
>(&ProjectionCameraDecorator::getHandleLeft
));
194 oType
.addInitialDesc(pDesc
);
196 pDesc
= new SFPlane::Description(
197 SFPlane::getClassType(),
199 "The bottom edge direction vector.\n",
200 BottomFieldId
, BottomFieldMask
,
202 (Field::SFDefaultFlags
| Field::FStdAccess
),
203 static_cast<FieldEditMethodSig
>(&ProjectionCameraDecorator::editHandleBottom
),
204 static_cast<FieldGetMethodSig
>(&ProjectionCameraDecorator::getHandleBottom
));
206 oType
.addInitialDesc(pDesc
);
208 pDesc
= new SFPlane::Description(
209 SFPlane::getClassType(),
211 "The normal of the projection surface.\n",
212 NormalFieldId
, NormalFieldMask
,
214 (Field::SFDefaultFlags
| Field::FStdAccess
),
215 static_cast<FieldEditMethodSig
>(&ProjectionCameraDecorator::editHandleNormal
),
216 static_cast<FieldGetMethodSig
>(&ProjectionCameraDecorator::getHandleNormal
));
218 oType
.addInitialDesc(pDesc
);
220 pDesc
= new SFReal32::Description(
221 SFReal32::getClassType(),
223 "The width of the projection screen.\n",
224 WidthFieldId
, WidthFieldMask
,
226 (Field::SFDefaultFlags
| Field::FStdAccess
),
227 static_cast<FieldEditMethodSig
>(&ProjectionCameraDecorator::editHandleWidth
),
228 static_cast<FieldGetMethodSig
>(&ProjectionCameraDecorator::getHandleWidth
));
230 oType
.addInitialDesc(pDesc
);
232 pDesc
= new SFReal32::Description(
233 SFReal32::getClassType(),
235 "The height of the projection screen.\n",
236 HeightFieldId
, HeightFieldMask
,
238 (Field::SFDefaultFlags
| Field::FStdAccess
),
239 static_cast<FieldEditMethodSig
>(&ProjectionCameraDecorator::editHandleHeight
),
240 static_cast<FieldGetMethodSig
>(&ProjectionCameraDecorator::getHandleHeight
));
242 oType
.addInitialDesc(pDesc
);
246 ProjectionCameraDecoratorBase::TypeObject
ProjectionCameraDecoratorBase::_type(
247 ProjectionCameraDecoratorBase::getClassname(),
248 Inherited::getClassname(),
251 reinterpret_cast<PrototypeCreateF
>(&ProjectionCameraDecoratorBase::createEmptyLocal
),
252 reinterpret_cast<InitContainerF
>(&ProjectionCameraDecorator::initMethod
),
253 reinterpret_cast<ExitContainerF
>(&ProjectionCameraDecorator::exitMethod
),
254 reinterpret_cast<InitalInsertDescFunc
>(
255 reinterpret_cast<void *>(&ProjectionCameraDecorator::classDescInserter
)),
258 "<?xml version=\"1.0\"?>\n"
261 " name=\"ProjectionCameraDecorator\"\n"
262 " parent=\"StereoCameraDecorator\"\n"
263 " library=\"Window\"\n"
264 " pointerfieldtypes=\"both\"\n"
265 " structure=\"concrete\"\n"
266 " systemcomponent=\"true\"\n"
267 " parentsystemcomponent=\"true\"\n"
268 " decoratable=\"false\"\n"
269 " docGroupBase=\"GrpWindowCamera\"\n"
271 " The decorator for tracked projection screens, see \\ref\n"
272 " PageSystemWindowCameraDecoratorsStereoProjection for a description.\n"
274 " The parameters are defined by the _sfUser and _mfSurface fields.\n"
278 " The derived parameters used to actually calculate the matrix are stored in the\n"
279 " _sfLeft, _sfBottom, _sfNormal, sfWidth and _sfHeight fields.\n"
284 "\t type=\"NodePtr\"\n"
285 "\t cardinality=\"single\"\n"
286 "\t visibility=\"external\"\n"
287 "\t access=\"public\"\n"
289 "\tThe coordinate system relative to the camera.\n"
292 "\t name=\"surface\"\n"
293 "\t type=\"Pnt3f\"\n"
294 "\t cardinality=\"multi\"\n"
295 "\t visibility=\"external\"\n"
296 "\t access=\"public\"\n"
298 "\t4 points describing the rectangular projection surface, in the camera\n"
299 " coordinate system. Counterclockwise, starting at lower left corner of the\n"
304 "\t type=\"Plane\"\n"
305 "\t cardinality=\"single\"\n"
306 "\t visibility=\"internal\"\n"
307 "\t access=\"protected\"\n"
309 "\tThe left edge direction vector.\n"
312 "\t name=\"bottom\"\n"
313 "\t type=\"Plane\"\n"
314 "\t cardinality=\"single\"\n"
315 "\t visibility=\"internal\"\n"
316 "\t access=\"protected\"\n"
318 "\tThe bottom edge direction vector.\n"
321 "\t name=\"normal\"\n"
322 "\t type=\"Plane\"\n"
323 "\t cardinality=\"single\"\n"
324 "\t visibility=\"internal\"\n"
325 "\t access=\"protected\"\n"
327 "\tThe normal of the projection surface.\n"
330 "\t name=\"width\"\n"
331 "\t type=\"Real32\"\n"
332 "\t cardinality=\"single\"\n"
333 "\t visibility=\"internal\"\n"
334 "\t access=\"public\"\n"
336 "\tThe width of the projection screen.\n"
339 "\t name=\"height\"\n"
340 "\t type=\"Real32\"\n"
341 "\t cardinality=\"single\"\n"
342 "\t visibility=\"internal\"\n"
343 "\t access=\"public\"\n"
345 "\tThe height of the projection screen.\n"
347 "</FieldContainer>\n",
348 "The decorator for tracked projection screens, see \\ref\n"
349 "PageSystemWindowCameraDecoratorsStereoProjection for a description.\n"
351 "The parameters are defined by the _sfUser and _mfSurface fields.\n"
355 "The derived parameters used to actually calculate the matrix are stored in the\n"
356 "_sfLeft, _sfBottom, _sfNormal, sfWidth and _sfHeight fields.\n"
361 /*------------------------------ get -----------------------------------*/
363 FieldContainerType
&ProjectionCameraDecoratorBase::getType(void)
368 const FieldContainerType
&ProjectionCameraDecoratorBase::getType(void) const
373 UInt32
ProjectionCameraDecoratorBase::getContainerSize(void) const
375 return sizeof(ProjectionCameraDecorator
);
378 /*------------------------- decorator get ------------------------------*/
381 //! Get the ProjectionCameraDecorator::_sfUser field.
382 const SFUnrecNodePtr
*ProjectionCameraDecoratorBase::getSFUser(void) const
387 SFUnrecNodePtr
*ProjectionCameraDecoratorBase::editSFUser (void)
389 editSField(UserFieldMask
);
394 //! Get the value of the ProjectionCameraDecorator::_sfUser field.
395 Node
* ProjectionCameraDecoratorBase::getUser(void) const
397 return _sfUser
.getValue();
400 //! Set the value of the ProjectionCameraDecorator::_sfUser field.
401 void ProjectionCameraDecoratorBase::setUser(Node
* const value
)
403 editSField(UserFieldMask
);
405 _sfUser
.setValue(value
);
409 MFPnt3f
*ProjectionCameraDecoratorBase::editMFSurface(void)
411 editMField(SurfaceFieldMask
, _mfSurface
);
416 const MFPnt3f
*ProjectionCameraDecoratorBase::getMFSurface(void) const
422 SFPlane
*ProjectionCameraDecoratorBase::editSFLeft(void)
424 editSField(LeftFieldMask
);
429 const SFPlane
*ProjectionCameraDecoratorBase::getSFLeft(void) const
435 SFPlane
*ProjectionCameraDecoratorBase::editSFBottom(void)
437 editSField(BottomFieldMask
);
442 const SFPlane
*ProjectionCameraDecoratorBase::getSFBottom(void) const
448 SFPlane
*ProjectionCameraDecoratorBase::editSFNormal(void)
450 editSField(NormalFieldMask
);
455 const SFPlane
*ProjectionCameraDecoratorBase::getSFNormal(void) const
461 SFReal32
*ProjectionCameraDecoratorBase::editSFWidth(void)
463 editSField(WidthFieldMask
);
468 const SFReal32
*ProjectionCameraDecoratorBase::getSFWidth(void) const
474 SFReal32
*ProjectionCameraDecoratorBase::editSFHeight(void)
476 editSField(HeightFieldMask
);
481 const SFReal32
*ProjectionCameraDecoratorBase::getSFHeight(void) const
491 /*------------------------------ access -----------------------------------*/
493 SizeT
ProjectionCameraDecoratorBase::getBinSize(ConstFieldMaskArg whichField
)
495 SizeT returnValue
= Inherited::getBinSize(whichField
);
497 if(FieldBits::NoField
!= (UserFieldMask
& whichField
))
499 returnValue
+= _sfUser
.getBinSize();
501 if(FieldBits::NoField
!= (SurfaceFieldMask
& whichField
))
503 returnValue
+= _mfSurface
.getBinSize();
505 if(FieldBits::NoField
!= (LeftFieldMask
& whichField
))
507 returnValue
+= _sfLeft
.getBinSize();
509 if(FieldBits::NoField
!= (BottomFieldMask
& whichField
))
511 returnValue
+= _sfBottom
.getBinSize();
513 if(FieldBits::NoField
!= (NormalFieldMask
& whichField
))
515 returnValue
+= _sfNormal
.getBinSize();
517 if(FieldBits::NoField
!= (WidthFieldMask
& whichField
))
519 returnValue
+= _sfWidth
.getBinSize();
521 if(FieldBits::NoField
!= (HeightFieldMask
& whichField
))
523 returnValue
+= _sfHeight
.getBinSize();
529 void ProjectionCameraDecoratorBase::copyToBin(BinaryDataHandler
&pMem
,
530 ConstFieldMaskArg whichField
)
532 Inherited::copyToBin(pMem
, whichField
);
534 if(FieldBits::NoField
!= (UserFieldMask
& whichField
))
536 _sfUser
.copyToBin(pMem
);
538 if(FieldBits::NoField
!= (SurfaceFieldMask
& whichField
))
540 _mfSurface
.copyToBin(pMem
);
542 if(FieldBits::NoField
!= (LeftFieldMask
& whichField
))
544 _sfLeft
.copyToBin(pMem
);
546 if(FieldBits::NoField
!= (BottomFieldMask
& whichField
))
548 _sfBottom
.copyToBin(pMem
);
550 if(FieldBits::NoField
!= (NormalFieldMask
& whichField
))
552 _sfNormal
.copyToBin(pMem
);
554 if(FieldBits::NoField
!= (WidthFieldMask
& whichField
))
556 _sfWidth
.copyToBin(pMem
);
558 if(FieldBits::NoField
!= (HeightFieldMask
& whichField
))
560 _sfHeight
.copyToBin(pMem
);
564 void ProjectionCameraDecoratorBase::copyFromBin(BinaryDataHandler
&pMem
,
565 ConstFieldMaskArg whichField
)
567 Inherited::copyFromBin(pMem
, whichField
);
569 if(FieldBits::NoField
!= (UserFieldMask
& whichField
))
571 editSField(UserFieldMask
);
572 _sfUser
.copyFromBin(pMem
);
574 if(FieldBits::NoField
!= (SurfaceFieldMask
& whichField
))
576 editMField(SurfaceFieldMask
, _mfSurface
);
577 _mfSurface
.copyFromBin(pMem
);
579 if(FieldBits::NoField
!= (LeftFieldMask
& whichField
))
581 editSField(LeftFieldMask
);
582 _sfLeft
.copyFromBin(pMem
);
584 if(FieldBits::NoField
!= (BottomFieldMask
& whichField
))
586 editSField(BottomFieldMask
);
587 _sfBottom
.copyFromBin(pMem
);
589 if(FieldBits::NoField
!= (NormalFieldMask
& whichField
))
591 editSField(NormalFieldMask
);
592 _sfNormal
.copyFromBin(pMem
);
594 if(FieldBits::NoField
!= (WidthFieldMask
& whichField
))
596 editSField(WidthFieldMask
);
597 _sfWidth
.copyFromBin(pMem
);
599 if(FieldBits::NoField
!= (HeightFieldMask
& whichField
))
601 editSField(HeightFieldMask
);
602 _sfHeight
.copyFromBin(pMem
);
606 //! create a new instance of the class
607 ProjectionCameraDecoratorTransitPtr
ProjectionCameraDecoratorBase::createLocal(BitVector bFlags
)
609 ProjectionCameraDecoratorTransitPtr fc
;
611 if(getClassType().getPrototype() != NULL
)
613 FieldContainerTransitPtr tmpPtr
=
614 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
616 fc
= dynamic_pointer_cast
<ProjectionCameraDecorator
>(tmpPtr
);
622 //! create a new instance of the class, copy the container flags
623 ProjectionCameraDecoratorTransitPtr
ProjectionCameraDecoratorBase::createDependent(BitVector bFlags
)
625 ProjectionCameraDecoratorTransitPtr fc
;
627 if(getClassType().getPrototype() != NULL
)
629 FieldContainerTransitPtr tmpPtr
=
630 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
632 fc
= dynamic_pointer_cast
<ProjectionCameraDecorator
>(tmpPtr
);
638 //! create a new instance of the class
639 ProjectionCameraDecoratorTransitPtr
ProjectionCameraDecoratorBase::create(void)
641 ProjectionCameraDecoratorTransitPtr fc
;
643 if(getClassType().getPrototype() != NULL
)
645 FieldContainerTransitPtr tmpPtr
=
646 getClassType().getPrototype()-> shallowCopy();
648 fc
= dynamic_pointer_cast
<ProjectionCameraDecorator
>(tmpPtr
);
654 ProjectionCameraDecorator
*ProjectionCameraDecoratorBase::createEmptyLocal(BitVector bFlags
)
656 ProjectionCameraDecorator
*returnValue
;
658 newPtr
<ProjectionCameraDecorator
>(returnValue
, bFlags
);
660 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
665 //! create an empty new instance of the class, do not copy the prototype
666 ProjectionCameraDecorator
*ProjectionCameraDecoratorBase::createEmpty(void)
668 ProjectionCameraDecorator
*returnValue
;
670 newPtr
<ProjectionCameraDecorator
>(returnValue
, Thread::getCurrentLocalFlags());
672 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
673 ~Thread::getCurrentLocalFlags();
679 FieldContainerTransitPtr
ProjectionCameraDecoratorBase::shallowCopyLocal(
680 BitVector bFlags
) const
682 ProjectionCameraDecorator
*tmpPtr
;
684 newPtr(tmpPtr
, dynamic_cast<const ProjectionCameraDecorator
*>(this), bFlags
);
686 FieldContainerTransitPtr
returnValue(tmpPtr
);
688 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
693 FieldContainerTransitPtr
ProjectionCameraDecoratorBase::shallowCopyDependent(
694 BitVector bFlags
) const
696 ProjectionCameraDecorator
*tmpPtr
;
698 newPtr(tmpPtr
, dynamic_cast<const ProjectionCameraDecorator
*>(this), ~bFlags
);
700 FieldContainerTransitPtr
returnValue(tmpPtr
);
702 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
707 FieldContainerTransitPtr
ProjectionCameraDecoratorBase::shallowCopy(void) const
709 ProjectionCameraDecorator
*tmpPtr
;
712 dynamic_cast<const ProjectionCameraDecorator
*>(this),
713 Thread::getCurrentLocalFlags());
715 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
717 FieldContainerTransitPtr
returnValue(tmpPtr
);
725 /*------------------------- constructors ----------------------------------*/
727 ProjectionCameraDecoratorBase::ProjectionCameraDecoratorBase(void) :
739 ProjectionCameraDecoratorBase::ProjectionCameraDecoratorBase(const ProjectionCameraDecoratorBase
&source
) :
742 _mfSurface (source
._mfSurface
),
743 _sfLeft (source
._sfLeft
),
744 _sfBottom (source
._sfBottom
),
745 _sfNormal (source
._sfNormal
),
746 _sfWidth (source
._sfWidth
),
747 _sfHeight (source
._sfHeight
)
752 /*-------------------------- destructors ----------------------------------*/
754 ProjectionCameraDecoratorBase::~ProjectionCameraDecoratorBase(void)
758 void ProjectionCameraDecoratorBase::onCreate(const ProjectionCameraDecorator
*source
)
760 Inherited::onCreate(source
);
764 ProjectionCameraDecorator
*pThis
= static_cast<ProjectionCameraDecorator
*>(this);
766 pThis
->setUser(source
->getUser());
770 GetFieldHandlePtr
ProjectionCameraDecoratorBase::getHandleUser (void) const
772 SFUnrecNodePtr::GetHandlePtr
returnValue(
773 new SFUnrecNodePtr::GetHandle(
775 this->getType().getFieldDesc(UserFieldId
),
776 const_cast<ProjectionCameraDecoratorBase
*>(this)));
781 EditFieldHandlePtr
ProjectionCameraDecoratorBase::editHandleUser (void)
783 SFUnrecNodePtr::EditHandlePtr
returnValue(
784 new SFUnrecNodePtr::EditHandle(
786 this->getType().getFieldDesc(UserFieldId
),
789 returnValue
->setSetMethod(
790 boost::bind(&ProjectionCameraDecorator::setUser
,
791 static_cast<ProjectionCameraDecorator
*>(this), _1
));
793 editSField(UserFieldMask
);
798 GetFieldHandlePtr
ProjectionCameraDecoratorBase::getHandleSurface (void) const
800 MFPnt3f::GetHandlePtr
returnValue(
801 new MFPnt3f::GetHandle(
803 this->getType().getFieldDesc(SurfaceFieldId
),
804 const_cast<ProjectionCameraDecoratorBase
*>(this)));
809 EditFieldHandlePtr
ProjectionCameraDecoratorBase::editHandleSurface (void)
811 MFPnt3f::EditHandlePtr
returnValue(
812 new MFPnt3f::EditHandle(
814 this->getType().getFieldDesc(SurfaceFieldId
),
818 editMField(SurfaceFieldMask
, _mfSurface
);
823 GetFieldHandlePtr
ProjectionCameraDecoratorBase::getHandleLeft (void) const
825 SFPlane::GetHandlePtr
returnValue(
826 new SFPlane::GetHandle(
828 this->getType().getFieldDesc(LeftFieldId
),
829 const_cast<ProjectionCameraDecoratorBase
*>(this)));
834 EditFieldHandlePtr
ProjectionCameraDecoratorBase::editHandleLeft (void)
836 SFPlane::EditHandlePtr
returnValue(
837 new SFPlane::EditHandle(
839 this->getType().getFieldDesc(LeftFieldId
),
843 editSField(LeftFieldMask
);
848 GetFieldHandlePtr
ProjectionCameraDecoratorBase::getHandleBottom (void) const
850 SFPlane::GetHandlePtr
returnValue(
851 new SFPlane::GetHandle(
853 this->getType().getFieldDesc(BottomFieldId
),
854 const_cast<ProjectionCameraDecoratorBase
*>(this)));
859 EditFieldHandlePtr
ProjectionCameraDecoratorBase::editHandleBottom (void)
861 SFPlane::EditHandlePtr
returnValue(
862 new SFPlane::EditHandle(
864 this->getType().getFieldDesc(BottomFieldId
),
868 editSField(BottomFieldMask
);
873 GetFieldHandlePtr
ProjectionCameraDecoratorBase::getHandleNormal (void) const
875 SFPlane::GetHandlePtr
returnValue(
876 new SFPlane::GetHandle(
878 this->getType().getFieldDesc(NormalFieldId
),
879 const_cast<ProjectionCameraDecoratorBase
*>(this)));
884 EditFieldHandlePtr
ProjectionCameraDecoratorBase::editHandleNormal (void)
886 SFPlane::EditHandlePtr
returnValue(
887 new SFPlane::EditHandle(
889 this->getType().getFieldDesc(NormalFieldId
),
893 editSField(NormalFieldMask
);
898 GetFieldHandlePtr
ProjectionCameraDecoratorBase::getHandleWidth (void) const
900 SFReal32::GetHandlePtr
returnValue(
901 new SFReal32::GetHandle(
903 this->getType().getFieldDesc(WidthFieldId
),
904 const_cast<ProjectionCameraDecoratorBase
*>(this)));
909 EditFieldHandlePtr
ProjectionCameraDecoratorBase::editHandleWidth (void)
911 SFReal32::EditHandlePtr
returnValue(
912 new SFReal32::EditHandle(
914 this->getType().getFieldDesc(WidthFieldId
),
918 editSField(WidthFieldMask
);
923 GetFieldHandlePtr
ProjectionCameraDecoratorBase::getHandleHeight (void) const
925 SFReal32::GetHandlePtr
returnValue(
926 new SFReal32::GetHandle(
928 this->getType().getFieldDesc(HeightFieldId
),
929 const_cast<ProjectionCameraDecoratorBase
*>(this)));
934 EditFieldHandlePtr
ProjectionCameraDecoratorBase::editHandleHeight (void)
936 SFReal32::EditHandlePtr
returnValue(
937 new SFReal32::EditHandle(
939 this->getType().getFieldDesc(HeightFieldId
),
943 editSField(HeightFieldMask
);
949 #ifdef OSG_MT_CPTR_ASPECT
950 void ProjectionCameraDecoratorBase::execSyncV( FieldContainer
&oFrom
,
951 ConstFieldMaskArg whichField
,
952 AspectOffsetStore
&oOffsets
,
953 ConstFieldMaskArg syncMode
,
954 const UInt32 uiSyncInfo
)
956 ProjectionCameraDecorator
*pThis
= static_cast<ProjectionCameraDecorator
*>(this);
958 pThis
->execSync(static_cast<ProjectionCameraDecorator
*>(&oFrom
),
967 #ifdef OSG_MT_CPTR_ASPECT
968 FieldContainer
*ProjectionCameraDecoratorBase::createAspectCopy(
969 const FieldContainer
*pRefAspect
) const
971 ProjectionCameraDecorator
*returnValue
;
973 newAspectCopy(returnValue
,
974 dynamic_cast<const ProjectionCameraDecorator
*>(pRefAspect
),
975 dynamic_cast<const ProjectionCameraDecorator
*>(this));
981 void ProjectionCameraDecoratorBase::resolveLinks(void)
983 Inherited::resolveLinks();
985 static_cast<ProjectionCameraDecorator
*>(this)->setUser(NULL
);
987 #ifdef OSG_MT_CPTR_ASPECT
988 AspectOffsetStore oOffsets
;
990 _pAspectStore
->fillOffsetArray(oOffsets
, this);
993 #ifdef OSG_MT_CPTR_ASPECT
994 _mfSurface
.terminateShare(Thread::getCurrentAspect(),