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 MatrixCameraDecorator!
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 "OSGMatrixCameraDecoratorBase.h"
67 #include "OSGMatrixCameraDecorator.h"
69 #include <boost/bind.hpp>
73 /***************************************************************************\
75 \***************************************************************************/
77 /*! \class OSG::MatrixCameraDecorator
78 The OSG::MatrixCameraDecorator for modifying the camera matrices by
80 PageSystemWindowCameraDecoratorsMatrix for a description.
82 The matrices to use are defined by the _sf Fields. The size of the full
83 image is defined by the _sfFullWidth and
87 /***************************************************************************\
88 * Field Documentation *
89 \***************************************************************************/
91 /*! \var Matrix MatrixCameraDecoratorBase::_sfPreViewing
92 The matrix to multiply to the right of the viewing matrix, i.e.
93 applied before the viewing matrix.
96 /*! \var Matrix MatrixCameraDecoratorBase::_sfPostViewing
97 The matrix to multiply to the left of the viewing matrix, i.e.
98 applied after the viewing matrix.
101 /*! \var Matrix MatrixCameraDecoratorBase::_sfPreProjectionTranslation
102 The matrix to multiply to the right of the projectionTranslation matrix,
103 i.e. applied before the projectionTranslation matrix.
106 /*! \var Matrix MatrixCameraDecoratorBase::_sfPostProjectionTranslation
107 The matrix to multiply to the left of the projectionTranslation matrix,
108 i.e. applied before the projectionTranslation matrix.
111 /*! \var Matrix MatrixCameraDecoratorBase::_sfPreProjection
112 The matrix to multiply to the right of the projection matrix, i.e.
113 applied before the projection matrix.
116 /*! \var Matrix MatrixCameraDecoratorBase::_sfPostProjection
117 The matrix to multiply to the left of the projection matrix, i.e.
118 applied before the projection matrix.
122 /***************************************************************************\
123 * FieldType/FieldTrait Instantiation *
124 \***************************************************************************/
126 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
127 PointerType FieldTraits
<MatrixCameraDecorator
*, nsOSG
>::_type(
128 "MatrixCameraDecoratorPtr",
129 "CameraDecoratorPtr",
130 MatrixCameraDecorator::getClassType(),
134 OSG_FIELDTRAITS_GETTYPE_NS(MatrixCameraDecorator
*, nsOSG
)
136 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
137 MatrixCameraDecorator
*,
140 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
141 MatrixCameraDecorator
*,
144 /***************************************************************************\
145 * Field Description *
146 \***************************************************************************/
148 void MatrixCameraDecoratorBase::classDescInserter(TypeObject
&oType
)
150 FieldDescriptionBase
*pDesc
= NULL
;
153 pDesc
= new SFMatrix::Description(
154 SFMatrix::getClassType(),
156 "The matrix to multiply to the right of the viewing matrix, i.e. \n"
157 "applied before the viewing matrix.\n",
158 PreViewingFieldId
, PreViewingFieldMask
,
160 (Field::SFDefaultFlags
| Field::FStdAccess
),
161 static_cast<FieldEditMethodSig
>(&MatrixCameraDecorator::editHandlePreViewing
),
162 static_cast<FieldGetMethodSig
>(&MatrixCameraDecorator::getHandlePreViewing
));
164 oType
.addInitialDesc(pDesc
);
166 pDesc
= new SFMatrix::Description(
167 SFMatrix::getClassType(),
169 "The matrix to multiply to the left of the viewing matrix, i.e. \n"
170 "applied after the viewing matrix.\n",
171 PostViewingFieldId
, PostViewingFieldMask
,
173 (Field::SFDefaultFlags
| Field::FStdAccess
),
174 static_cast<FieldEditMethodSig
>(&MatrixCameraDecorator::editHandlePostViewing
),
175 static_cast<FieldGetMethodSig
>(&MatrixCameraDecorator::getHandlePostViewing
));
177 oType
.addInitialDesc(pDesc
);
179 pDesc
= new SFMatrix::Description(
180 SFMatrix::getClassType(),
181 "preProjectionTranslation",
182 "The matrix to multiply to the right of the projectionTranslation matrix,\n"
183 "i.e. applied before the projectionTranslation matrix.\n",
184 PreProjectionTranslationFieldId
, PreProjectionTranslationFieldMask
,
186 (Field::SFDefaultFlags
| Field::FStdAccess
),
187 static_cast<FieldEditMethodSig
>(&MatrixCameraDecorator::editHandlePreProjectionTranslation
),
188 static_cast<FieldGetMethodSig
>(&MatrixCameraDecorator::getHandlePreProjectionTranslation
));
190 oType
.addInitialDesc(pDesc
);
192 pDesc
= new SFMatrix::Description(
193 SFMatrix::getClassType(),
194 "postProjectionTranslation",
195 "The matrix to multiply to the left of the projectionTranslation matrix,\n"
196 "i.e. applied before the projectionTranslation matrix.\n",
197 PostProjectionTranslationFieldId
, PostProjectionTranslationFieldMask
,
199 (Field::SFDefaultFlags
| Field::FStdAccess
),
200 static_cast<FieldEditMethodSig
>(&MatrixCameraDecorator::editHandlePostProjectionTranslation
),
201 static_cast<FieldGetMethodSig
>(&MatrixCameraDecorator::getHandlePostProjectionTranslation
));
203 oType
.addInitialDesc(pDesc
);
205 pDesc
= new SFMatrix::Description(
206 SFMatrix::getClassType(),
208 "The matrix to multiply to the right of the projection matrix, i.e. \n"
209 "applied before the projection matrix.\n",
210 PreProjectionFieldId
, PreProjectionFieldMask
,
212 (Field::SFDefaultFlags
| Field::FStdAccess
),
213 static_cast<FieldEditMethodSig
>(&MatrixCameraDecorator::editHandlePreProjection
),
214 static_cast<FieldGetMethodSig
>(&MatrixCameraDecorator::getHandlePreProjection
));
216 oType
.addInitialDesc(pDesc
);
218 pDesc
= new SFMatrix::Description(
219 SFMatrix::getClassType(),
221 "The matrix to multiply to the left of the projection matrix, i.e. \n"
222 "applied before the projection matrix.\n",
223 PostProjectionFieldId
, PostProjectionFieldMask
,
225 (Field::SFDefaultFlags
| Field::FStdAccess
),
226 static_cast<FieldEditMethodSig
>(&MatrixCameraDecorator::editHandlePostProjection
),
227 static_cast<FieldGetMethodSig
>(&MatrixCameraDecorator::getHandlePostProjection
));
229 oType
.addInitialDesc(pDesc
);
233 MatrixCameraDecoratorBase::TypeObject
MatrixCameraDecoratorBase::_type(
234 MatrixCameraDecoratorBase::getClassname(),
235 Inherited::getClassname(),
238 reinterpret_cast<PrototypeCreateF
>(&MatrixCameraDecoratorBase::createEmptyLocal
),
239 reinterpret_cast<InitContainerF
>(&MatrixCameraDecorator::initMethod
),
240 reinterpret_cast<ExitContainerF
>(&MatrixCameraDecorator::exitMethod
),
241 reinterpret_cast<InitalInsertDescFunc
>(
242 reinterpret_cast<void *>(&MatrixCameraDecorator::classDescInserter
)),
245 "<?xml version=\"1.0\"?>\n"
248 " name=\"MatrixCameraDecorator\"\n"
249 " parent=\"CameraDecorator\"\n"
250 " library=\"Window\"\n"
251 " pointerfieldtypes=\"both\"\n"
252 " structure=\"concrete\"\n"
253 " systemcomponent=\"true\"\n"
254 " parentsystemcomponent=\"true\"\n"
255 " docGroupBase=\"GrpWindowCamera\"\n"
257 " The OSG::MatrixCameraDecorator for modifying the camera matrices by \n"
258 " matrices, see \\ref\n"
259 " PageSystemWindowCameraDecoratorsMatrix for a description.\n"
261 " The matrices to use are defined by the _sf Fields. The size of the full\n"
262 " image is defined by the _sfFullWidth and\n"
263 " _sfFullHeight Fields.\n"
265 "\t name=\"preViewing\"\n"
266 "\t type=\"Matrix\"\n"
267 "\t cardinality=\"single\"\n"
268 "\t visibility=\"external\"\n"
269 "\t defaultValue=\"1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1\"\n"
270 "\t access=\"public\"\n"
272 "\tThe matrix to multiply to the right of the viewing matrix, i.e. \n"
273 " applied before the viewing matrix.\n"
276 "\t name=\"postViewing\"\n"
277 "\t type=\"Matrix\"\n"
278 "\t cardinality=\"single\"\n"
279 "\t visibility=\"external\"\n"
280 "\t defaultValue=\"1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1\"\n"
281 "\t access=\"public\"\n"
283 "\tThe matrix to multiply to the left of the viewing matrix, i.e. \n"
284 " applied after the viewing matrix.\n"
287 "\t name=\"preProjectionTranslation\"\n"
288 "\t type=\"Matrix\"\n"
289 "\t cardinality=\"single\"\n"
290 "\t visibility=\"external\"\n"
291 "\t defaultValue=\"1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1\"\n"
292 "\t access=\"public\"\n"
294 "\tThe matrix to multiply to the right of the projectionTranslation matrix,\n"
295 "\ti.e. applied before the projectionTranslation matrix.\n"
298 "\t name=\"postProjectionTranslation\"\n"
299 "\t type=\"Matrix\"\n"
300 "\t cardinality=\"single\"\n"
301 "\t visibility=\"external\"\n"
302 "\t defaultValue=\"1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1\"\n"
303 "\t access=\"public\"\n"
305 "\tThe matrix to multiply to the left of the projectionTranslation matrix,\n"
306 "\ti.e. applied before the projectionTranslation matrix.\n"
309 "\t name=\"preProjection\"\n"
310 "\t type=\"Matrix\"\n"
311 "\t cardinality=\"single\"\n"
312 "\t visibility=\"external\"\n"
313 "\t defaultValue=\"1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1\"\n"
314 "\t access=\"public\"\n"
316 "\tThe matrix to multiply to the right of the projection matrix, i.e. \n"
317 " applied before the projection matrix.\n"
320 "\t name=\"postProjection\"\n"
321 "\t type=\"Matrix\"\n"
322 "\t cardinality=\"single\"\n"
323 "\t visibility=\"external\"\n"
324 "\t defaultValue=\"1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1\"\n"
325 "\t access=\"public\"\n"
327 "\tThe matrix to multiply to the left of the projection matrix, i.e. \n"
328 " applied before the projection matrix.\n"
330 "</FieldContainer>\n",
331 "The OSG::MatrixCameraDecorator for modifying the camera matrices by \n"
332 "matrices, see \\ref\n"
333 "PageSystemWindowCameraDecoratorsMatrix for a description.\n"
335 "The matrices to use are defined by the _sf Fields. The size of the full\n"
336 "image is defined by the _sfFullWidth and\n"
337 "_sfFullHeight Fields.\n"
340 /*------------------------------ get -----------------------------------*/
342 FieldContainerType
&MatrixCameraDecoratorBase::getType(void)
347 const FieldContainerType
&MatrixCameraDecoratorBase::getType(void) const
352 UInt32
MatrixCameraDecoratorBase::getContainerSize(void) const
354 return sizeof(MatrixCameraDecorator
);
357 /*------------------------- decorator get ------------------------------*/
360 SFMatrix
*MatrixCameraDecoratorBase::editSFPreViewing(void)
362 editSField(PreViewingFieldMask
);
364 return &_sfPreViewing
;
367 const SFMatrix
*MatrixCameraDecoratorBase::getSFPreViewing(void) const
369 return &_sfPreViewing
;
373 SFMatrix
*MatrixCameraDecoratorBase::editSFPostViewing(void)
375 editSField(PostViewingFieldMask
);
377 return &_sfPostViewing
;
380 const SFMatrix
*MatrixCameraDecoratorBase::getSFPostViewing(void) const
382 return &_sfPostViewing
;
386 SFMatrix
*MatrixCameraDecoratorBase::editSFPreProjectionTranslation(void)
388 editSField(PreProjectionTranslationFieldMask
);
390 return &_sfPreProjectionTranslation
;
393 const SFMatrix
*MatrixCameraDecoratorBase::getSFPreProjectionTranslation(void) const
395 return &_sfPreProjectionTranslation
;
399 SFMatrix
*MatrixCameraDecoratorBase::editSFPostProjectionTranslation(void)
401 editSField(PostProjectionTranslationFieldMask
);
403 return &_sfPostProjectionTranslation
;
406 const SFMatrix
*MatrixCameraDecoratorBase::getSFPostProjectionTranslation(void) const
408 return &_sfPostProjectionTranslation
;
412 SFMatrix
*MatrixCameraDecoratorBase::editSFPreProjection(void)
414 editSField(PreProjectionFieldMask
);
416 return &_sfPreProjection
;
419 const SFMatrix
*MatrixCameraDecoratorBase::getSFPreProjection(void) const
421 return &_sfPreProjection
;
425 SFMatrix
*MatrixCameraDecoratorBase::editSFPostProjection(void)
427 editSField(PostProjectionFieldMask
);
429 return &_sfPostProjection
;
432 const SFMatrix
*MatrixCameraDecoratorBase::getSFPostProjection(void) const
434 return &_sfPostProjection
;
442 /*------------------------------ access -----------------------------------*/
444 SizeT
MatrixCameraDecoratorBase::getBinSize(ConstFieldMaskArg whichField
)
446 SizeT returnValue
= Inherited::getBinSize(whichField
);
448 if(FieldBits::NoField
!= (PreViewingFieldMask
& whichField
))
450 returnValue
+= _sfPreViewing
.getBinSize();
452 if(FieldBits::NoField
!= (PostViewingFieldMask
& whichField
))
454 returnValue
+= _sfPostViewing
.getBinSize();
456 if(FieldBits::NoField
!= (PreProjectionTranslationFieldMask
& whichField
))
458 returnValue
+= _sfPreProjectionTranslation
.getBinSize();
460 if(FieldBits::NoField
!= (PostProjectionTranslationFieldMask
& whichField
))
462 returnValue
+= _sfPostProjectionTranslation
.getBinSize();
464 if(FieldBits::NoField
!= (PreProjectionFieldMask
& whichField
))
466 returnValue
+= _sfPreProjection
.getBinSize();
468 if(FieldBits::NoField
!= (PostProjectionFieldMask
& whichField
))
470 returnValue
+= _sfPostProjection
.getBinSize();
476 void MatrixCameraDecoratorBase::copyToBin(BinaryDataHandler
&pMem
,
477 ConstFieldMaskArg whichField
)
479 Inherited::copyToBin(pMem
, whichField
);
481 if(FieldBits::NoField
!= (PreViewingFieldMask
& whichField
))
483 _sfPreViewing
.copyToBin(pMem
);
485 if(FieldBits::NoField
!= (PostViewingFieldMask
& whichField
))
487 _sfPostViewing
.copyToBin(pMem
);
489 if(FieldBits::NoField
!= (PreProjectionTranslationFieldMask
& whichField
))
491 _sfPreProjectionTranslation
.copyToBin(pMem
);
493 if(FieldBits::NoField
!= (PostProjectionTranslationFieldMask
& whichField
))
495 _sfPostProjectionTranslation
.copyToBin(pMem
);
497 if(FieldBits::NoField
!= (PreProjectionFieldMask
& whichField
))
499 _sfPreProjection
.copyToBin(pMem
);
501 if(FieldBits::NoField
!= (PostProjectionFieldMask
& whichField
))
503 _sfPostProjection
.copyToBin(pMem
);
507 void MatrixCameraDecoratorBase::copyFromBin(BinaryDataHandler
&pMem
,
508 ConstFieldMaskArg whichField
)
510 Inherited::copyFromBin(pMem
, whichField
);
512 if(FieldBits::NoField
!= (PreViewingFieldMask
& whichField
))
514 editSField(PreViewingFieldMask
);
515 _sfPreViewing
.copyFromBin(pMem
);
517 if(FieldBits::NoField
!= (PostViewingFieldMask
& whichField
))
519 editSField(PostViewingFieldMask
);
520 _sfPostViewing
.copyFromBin(pMem
);
522 if(FieldBits::NoField
!= (PreProjectionTranslationFieldMask
& whichField
))
524 editSField(PreProjectionTranslationFieldMask
);
525 _sfPreProjectionTranslation
.copyFromBin(pMem
);
527 if(FieldBits::NoField
!= (PostProjectionTranslationFieldMask
& whichField
))
529 editSField(PostProjectionTranslationFieldMask
);
530 _sfPostProjectionTranslation
.copyFromBin(pMem
);
532 if(FieldBits::NoField
!= (PreProjectionFieldMask
& whichField
))
534 editSField(PreProjectionFieldMask
);
535 _sfPreProjection
.copyFromBin(pMem
);
537 if(FieldBits::NoField
!= (PostProjectionFieldMask
& whichField
))
539 editSField(PostProjectionFieldMask
);
540 _sfPostProjection
.copyFromBin(pMem
);
544 //! create a new instance of the class
545 MatrixCameraDecoratorTransitPtr
MatrixCameraDecoratorBase::createLocal(BitVector bFlags
)
547 MatrixCameraDecoratorTransitPtr fc
;
549 if(getClassType().getPrototype() != NULL
)
551 FieldContainerTransitPtr tmpPtr
=
552 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
554 fc
= dynamic_pointer_cast
<MatrixCameraDecorator
>(tmpPtr
);
560 //! create a new instance of the class, copy the container flags
561 MatrixCameraDecoratorTransitPtr
MatrixCameraDecoratorBase::createDependent(BitVector bFlags
)
563 MatrixCameraDecoratorTransitPtr fc
;
565 if(getClassType().getPrototype() != NULL
)
567 FieldContainerTransitPtr tmpPtr
=
568 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
570 fc
= dynamic_pointer_cast
<MatrixCameraDecorator
>(tmpPtr
);
576 //! create a new instance of the class
577 MatrixCameraDecoratorTransitPtr
MatrixCameraDecoratorBase::create(void)
579 MatrixCameraDecoratorTransitPtr fc
;
581 if(getClassType().getPrototype() != NULL
)
583 FieldContainerTransitPtr tmpPtr
=
584 getClassType().getPrototype()-> shallowCopy();
586 fc
= dynamic_pointer_cast
<MatrixCameraDecorator
>(tmpPtr
);
592 MatrixCameraDecorator
*MatrixCameraDecoratorBase::createEmptyLocal(BitVector bFlags
)
594 MatrixCameraDecorator
*returnValue
;
596 newPtr
<MatrixCameraDecorator
>(returnValue
, bFlags
);
598 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
603 //! create an empty new instance of the class, do not copy the prototype
604 MatrixCameraDecorator
*MatrixCameraDecoratorBase::createEmpty(void)
606 MatrixCameraDecorator
*returnValue
;
608 newPtr
<MatrixCameraDecorator
>(returnValue
, Thread::getCurrentLocalFlags());
610 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
611 ~Thread::getCurrentLocalFlags();
617 FieldContainerTransitPtr
MatrixCameraDecoratorBase::shallowCopyLocal(
618 BitVector bFlags
) const
620 MatrixCameraDecorator
*tmpPtr
;
622 newPtr(tmpPtr
, dynamic_cast<const MatrixCameraDecorator
*>(this), bFlags
);
624 FieldContainerTransitPtr
returnValue(tmpPtr
);
626 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
631 FieldContainerTransitPtr
MatrixCameraDecoratorBase::shallowCopyDependent(
632 BitVector bFlags
) const
634 MatrixCameraDecorator
*tmpPtr
;
636 newPtr(tmpPtr
, dynamic_cast<const MatrixCameraDecorator
*>(this), ~bFlags
);
638 FieldContainerTransitPtr
returnValue(tmpPtr
);
640 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
645 FieldContainerTransitPtr
MatrixCameraDecoratorBase::shallowCopy(void) const
647 MatrixCameraDecorator
*tmpPtr
;
650 dynamic_cast<const MatrixCameraDecorator
*>(this),
651 Thread::getCurrentLocalFlags());
653 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
655 FieldContainerTransitPtr
returnValue(tmpPtr
);
663 /*------------------------- constructors ----------------------------------*/
665 MatrixCameraDecoratorBase::MatrixCameraDecoratorBase(void) :
667 _sfPreViewing (Matrix(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1)),
668 _sfPostViewing (Matrix(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1)),
669 _sfPreProjectionTranslation(Matrix(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1)),
670 _sfPostProjectionTranslation(Matrix(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1)),
671 _sfPreProjection (Matrix(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1)),
672 _sfPostProjection (Matrix(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1))
676 MatrixCameraDecoratorBase::MatrixCameraDecoratorBase(const MatrixCameraDecoratorBase
&source
) :
678 _sfPreViewing (source
._sfPreViewing
),
679 _sfPostViewing (source
._sfPostViewing
),
680 _sfPreProjectionTranslation(source
._sfPreProjectionTranslation
),
681 _sfPostProjectionTranslation(source
._sfPostProjectionTranslation
),
682 _sfPreProjection (source
._sfPreProjection
),
683 _sfPostProjection (source
._sfPostProjection
)
688 /*-------------------------- destructors ----------------------------------*/
690 MatrixCameraDecoratorBase::~MatrixCameraDecoratorBase(void)
695 GetFieldHandlePtr
MatrixCameraDecoratorBase::getHandlePreViewing (void) const
697 SFMatrix::GetHandlePtr
returnValue(
698 new SFMatrix::GetHandle(
700 this->getType().getFieldDesc(PreViewingFieldId
),
701 const_cast<MatrixCameraDecoratorBase
*>(this)));
706 EditFieldHandlePtr
MatrixCameraDecoratorBase::editHandlePreViewing (void)
708 SFMatrix::EditHandlePtr
returnValue(
709 new SFMatrix::EditHandle(
711 this->getType().getFieldDesc(PreViewingFieldId
),
715 editSField(PreViewingFieldMask
);
720 GetFieldHandlePtr
MatrixCameraDecoratorBase::getHandlePostViewing (void) const
722 SFMatrix::GetHandlePtr
returnValue(
723 new SFMatrix::GetHandle(
725 this->getType().getFieldDesc(PostViewingFieldId
),
726 const_cast<MatrixCameraDecoratorBase
*>(this)));
731 EditFieldHandlePtr
MatrixCameraDecoratorBase::editHandlePostViewing (void)
733 SFMatrix::EditHandlePtr
returnValue(
734 new SFMatrix::EditHandle(
736 this->getType().getFieldDesc(PostViewingFieldId
),
740 editSField(PostViewingFieldMask
);
745 GetFieldHandlePtr
MatrixCameraDecoratorBase::getHandlePreProjectionTranslation (void) const
747 SFMatrix::GetHandlePtr
returnValue(
748 new SFMatrix::GetHandle(
749 &_sfPreProjectionTranslation
,
750 this->getType().getFieldDesc(PreProjectionTranslationFieldId
),
751 const_cast<MatrixCameraDecoratorBase
*>(this)));
756 EditFieldHandlePtr
MatrixCameraDecoratorBase::editHandlePreProjectionTranslation(void)
758 SFMatrix::EditHandlePtr
returnValue(
759 new SFMatrix::EditHandle(
760 &_sfPreProjectionTranslation
,
761 this->getType().getFieldDesc(PreProjectionTranslationFieldId
),
765 editSField(PreProjectionTranslationFieldMask
);
770 GetFieldHandlePtr
MatrixCameraDecoratorBase::getHandlePostProjectionTranslation (void) const
772 SFMatrix::GetHandlePtr
returnValue(
773 new SFMatrix::GetHandle(
774 &_sfPostProjectionTranslation
,
775 this->getType().getFieldDesc(PostProjectionTranslationFieldId
),
776 const_cast<MatrixCameraDecoratorBase
*>(this)));
781 EditFieldHandlePtr
MatrixCameraDecoratorBase::editHandlePostProjectionTranslation(void)
783 SFMatrix::EditHandlePtr
returnValue(
784 new SFMatrix::EditHandle(
785 &_sfPostProjectionTranslation
,
786 this->getType().getFieldDesc(PostProjectionTranslationFieldId
),
790 editSField(PostProjectionTranslationFieldMask
);
795 GetFieldHandlePtr
MatrixCameraDecoratorBase::getHandlePreProjection (void) const
797 SFMatrix::GetHandlePtr
returnValue(
798 new SFMatrix::GetHandle(
800 this->getType().getFieldDesc(PreProjectionFieldId
),
801 const_cast<MatrixCameraDecoratorBase
*>(this)));
806 EditFieldHandlePtr
MatrixCameraDecoratorBase::editHandlePreProjection (void)
808 SFMatrix::EditHandlePtr
returnValue(
809 new SFMatrix::EditHandle(
811 this->getType().getFieldDesc(PreProjectionFieldId
),
815 editSField(PreProjectionFieldMask
);
820 GetFieldHandlePtr
MatrixCameraDecoratorBase::getHandlePostProjection (void) const
822 SFMatrix::GetHandlePtr
returnValue(
823 new SFMatrix::GetHandle(
825 this->getType().getFieldDesc(PostProjectionFieldId
),
826 const_cast<MatrixCameraDecoratorBase
*>(this)));
831 EditFieldHandlePtr
MatrixCameraDecoratorBase::editHandlePostProjection (void)
833 SFMatrix::EditHandlePtr
returnValue(
834 new SFMatrix::EditHandle(
836 this->getType().getFieldDesc(PostProjectionFieldId
),
840 editSField(PostProjectionFieldMask
);
846 #ifdef OSG_MT_CPTR_ASPECT
847 void MatrixCameraDecoratorBase::execSyncV( FieldContainer
&oFrom
,
848 ConstFieldMaskArg whichField
,
849 AspectOffsetStore
&oOffsets
,
850 ConstFieldMaskArg syncMode
,
851 const UInt32 uiSyncInfo
)
853 MatrixCameraDecorator
*pThis
= static_cast<MatrixCameraDecorator
*>(this);
855 pThis
->execSync(static_cast<MatrixCameraDecorator
*>(&oFrom
),
864 #ifdef OSG_MT_CPTR_ASPECT
865 FieldContainer
*MatrixCameraDecoratorBase::createAspectCopy(
866 const FieldContainer
*pRefAspect
) const
868 MatrixCameraDecorator
*returnValue
;
870 newAspectCopy(returnValue
,
871 dynamic_cast<const MatrixCameraDecorator
*>(pRefAspect
),
872 dynamic_cast<const MatrixCameraDecorator
*>(this));
878 void MatrixCameraDecoratorBase::resolveLinks(void)
880 Inherited::resolveLinks();