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 CubeTextureObjChunk!
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 "OSGImage.h" // PosZImage Class
67 #include "OSGCubeTextureObjChunkBase.h"
68 #include "OSGCubeTextureObjChunk.h"
70 #include <boost/bind.hpp>
74 /***************************************************************************\
76 \***************************************************************************/
78 /*! \class OSG::CubeTextureObjChunk
79 See \ref PageSystemCubeTextureObjChunk for a description.
81 The CubeTexture is defined by 6 separate texture images. As it is derived
82 from the standard texture chunk it already has an image, which is used for
83 the negative Z direction. The other 5 images are stored in variables that
84 are named according to the direction they represent
85 (OSG::CubeTextureObjChunk::_sfPosZImage,
86 OSG::CubeTextureObjChunk::_sfNegYImage,
87 OSG::CubeTextureObjChunk::_sfPosYImage,
88 OSG::CubeTextureObjChunk::_sfNegXImage,
89 OSG::CubeTextureObjChunk::_sfPosXImage).
92 /***************************************************************************\
93 * Field Documentation *
94 \***************************************************************************/
96 /*! \var Image * CubeTextureObjChunkBase::_sfPosZImage
97 The image for the positive Z direction of the cube texture.
100 /*! \var Image * CubeTextureObjChunkBase::_sfPosXImage
101 The image for the positive X direction of the cube texture.
104 /*! \var Image * CubeTextureObjChunkBase::_sfNegXImage
105 The image for the negative X direction of the cube texture.
108 /*! \var Image * CubeTextureObjChunkBase::_sfPosYImage
109 The image for the positive Y direction of the cube texture.
112 /*! \var Image * CubeTextureObjChunkBase::_sfNegYImage
113 The image for the negative Y direction of the cube texture.
117 /***************************************************************************\
118 * FieldType/FieldTrait Instantiation *
119 \***************************************************************************/
121 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
122 PointerType FieldTraits
<CubeTextureObjChunk
*, nsOSG
>::_type(
123 "CubeTextureObjChunkPtr",
124 "TextureObjChunkPtr",
125 CubeTextureObjChunk::getClassType(),
129 OSG_FIELDTRAITS_GETTYPE_NS(CubeTextureObjChunk
*, nsOSG
)
131 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
132 CubeTextureObjChunk
*,
135 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
136 CubeTextureObjChunk
*,
139 /***************************************************************************\
140 * Field Description *
141 \***************************************************************************/
143 void CubeTextureObjChunkBase::classDescInserter(TypeObject
&oType
)
145 FieldDescriptionBase
*pDesc
= NULL
;
148 pDesc
= new SFUnrecImagePtr::Description(
149 SFUnrecImagePtr::getClassType(),
151 "The image for the positive Z direction of the cube texture.\n",
152 PosZImageFieldId
, PosZImageFieldMask
,
154 (Field::SFDefaultFlags
| Field::FStdAccess
),
155 static_cast<FieldEditMethodSig
>(&CubeTextureObjChunk::editHandlePosZImage
),
156 static_cast<FieldGetMethodSig
>(&CubeTextureObjChunk::getHandlePosZImage
));
158 oType
.addInitialDesc(pDesc
);
160 pDesc
= new SFUnrecImagePtr::Description(
161 SFUnrecImagePtr::getClassType(),
163 "The image for the positive X direction of the cube texture.\n",
164 PosXImageFieldId
, PosXImageFieldMask
,
166 (Field::SFDefaultFlags
| Field::FStdAccess
),
167 static_cast<FieldEditMethodSig
>(&CubeTextureObjChunk::editHandlePosXImage
),
168 static_cast<FieldGetMethodSig
>(&CubeTextureObjChunk::getHandlePosXImage
));
170 oType
.addInitialDesc(pDesc
);
172 pDesc
= new SFUnrecImagePtr::Description(
173 SFUnrecImagePtr::getClassType(),
175 "The image for the negative X direction of the cube texture.\n",
176 NegXImageFieldId
, NegXImageFieldMask
,
178 (Field::SFDefaultFlags
| Field::FStdAccess
),
179 static_cast<FieldEditMethodSig
>(&CubeTextureObjChunk::editHandleNegXImage
),
180 static_cast<FieldGetMethodSig
>(&CubeTextureObjChunk::getHandleNegXImage
));
182 oType
.addInitialDesc(pDesc
);
184 pDesc
= new SFUnrecImagePtr::Description(
185 SFUnrecImagePtr::getClassType(),
187 "The image for the positive Y direction of the cube texture.\n",
188 PosYImageFieldId
, PosYImageFieldMask
,
190 (Field::SFDefaultFlags
| Field::FStdAccess
),
191 static_cast<FieldEditMethodSig
>(&CubeTextureObjChunk::editHandlePosYImage
),
192 static_cast<FieldGetMethodSig
>(&CubeTextureObjChunk::getHandlePosYImage
));
194 oType
.addInitialDesc(pDesc
);
196 pDesc
= new SFUnrecImagePtr::Description(
197 SFUnrecImagePtr::getClassType(),
199 "The image for the negative Y direction of the cube texture.\n",
200 NegYImageFieldId
, NegYImageFieldMask
,
202 (Field::SFDefaultFlags
| Field::FStdAccess
),
203 static_cast<FieldEditMethodSig
>(&CubeTextureObjChunk::editHandleNegYImage
),
204 static_cast<FieldGetMethodSig
>(&CubeTextureObjChunk::getHandleNegYImage
));
206 oType
.addInitialDesc(pDesc
);
210 CubeTextureObjChunkBase::TypeObject
CubeTextureObjChunkBase::_type(
211 CubeTextureObjChunkBase::getClassname(),
212 Inherited::getClassname(),
215 reinterpret_cast<PrototypeCreateF
>(&CubeTextureObjChunkBase::createEmptyLocal
),
216 reinterpret_cast<InitContainerF
>(&CubeTextureObjChunk::initMethod
),
217 reinterpret_cast<ExitContainerF
>(&CubeTextureObjChunk::exitMethod
),
218 reinterpret_cast<InitalInsertDescFunc
>(
219 reinterpret_cast<void *>(&CubeTextureObjChunk::classDescInserter
)),
222 "<?xml version=\"1.0\"?>\n"
225 " name=\"CubeTextureObjChunk\"\n"
226 " parent=\"TextureObjChunk\"\n"
227 " library=\"State\"\n"
228 " pointerfieldtypes=\"both\"\n"
229 " structure=\"concrete\"\n"
230 " systemcomponent=\"true\"\n"
231 " parentsystemcomponent=\"true\"\n"
232 " decoratable=\"false\"\n"
233 " docGroupBase=\"GrpStateOpenGL\"\n"
235 " See \\ref PageSystemCubeTextureObjChunk for a description.\n"
237 " The CubeTexture is defined by 6 separate texture images. As it is derived\n"
238 " from the standard texture chunk it already has an image, which is used for\n"
239 " the negative Z direction. The other 5 images are stored in variables that\n"
240 " are named according to the direction they represent\n"
241 " (OSG::CubeTextureObjChunk::_sfPosZImage,\n"
242 " OSG::CubeTextureObjChunk::_sfNegYImage,\n"
243 " OSG::CubeTextureObjChunk::_sfPosYImage,\n"
244 " OSG::CubeTextureObjChunk::_sfNegXImage,\n"
245 " OSG::CubeTextureObjChunk::_sfPosXImage). \n"
247 "\t name=\"posZImage\"\n"
248 "\t type=\"ImagePtr\"\n"
249 "\t cardinality=\"single\"\n"
250 "\t visibility=\"external\"\n"
251 "\t access=\"public\"\n"
253 "\tThe image for the positive Z direction of the cube texture.\n"
256 "\t name=\"posXImage\"\n"
257 "\t type=\"ImagePtr\"\n"
258 "\t cardinality=\"single\"\n"
259 "\t visibility=\"external\"\n"
260 "\t access=\"public\"\n"
262 "\tThe image for the positive X direction of the cube texture.\n"
265 "\t name=\"negXImage\"\n"
266 "\t type=\"ImagePtr\"\n"
267 "\t cardinality=\"single\"\n"
268 "\t visibility=\"external\"\n"
269 "\t access=\"public\"\n"
271 "\tThe image for the negative X direction of the cube texture.\n"
274 "\t name=\"posYImage\"\n"
275 "\t type=\"ImagePtr\"\n"
276 "\t cardinality=\"single\"\n"
277 "\t visibility=\"external\"\n"
278 "\t access=\"public\"\n"
280 "\tThe image for the positive Y direction of the cube texture.\n"
283 "\t name=\"negYImage\"\n"
284 "\t type=\"ImagePtr\"\n"
285 "\t cardinality=\"single\"\n"
286 "\t visibility=\"external\"\n"
287 "\t access=\"public\"\n"
289 "\tThe image for the negative Y direction of the cube texture.\n"
291 "</FieldContainer>\n",
292 "See \\ref PageSystemCubeTextureObjChunk for a description.\n"
294 "The CubeTexture is defined by 6 separate texture images. As it is derived\n"
295 "from the standard texture chunk it already has an image, which is used for\n"
296 "the negative Z direction. The other 5 images are stored in variables that\n"
297 "are named according to the direction they represent\n"
298 "(OSG::CubeTextureObjChunk::_sfPosZImage,\n"
299 "OSG::CubeTextureObjChunk::_sfNegYImage,\n"
300 "OSG::CubeTextureObjChunk::_sfPosYImage,\n"
301 "OSG::CubeTextureObjChunk::_sfNegXImage,\n"
302 "OSG::CubeTextureObjChunk::_sfPosXImage). \n"
305 /*------------------------------ get -----------------------------------*/
307 FieldContainerType
&CubeTextureObjChunkBase::getType(void)
312 const FieldContainerType
&CubeTextureObjChunkBase::getType(void) const
317 UInt32
CubeTextureObjChunkBase::getContainerSize(void) const
319 return sizeof(CubeTextureObjChunk
);
322 /*------------------------- decorator get ------------------------------*/
325 //! Get the CubeTextureObjChunk::_sfPosZImage field.
326 const SFUnrecImagePtr
*CubeTextureObjChunkBase::getSFPosZImage(void) const
328 return &_sfPosZImage
;
331 SFUnrecImagePtr
*CubeTextureObjChunkBase::editSFPosZImage (void)
333 editSField(PosZImageFieldMask
);
335 return &_sfPosZImage
;
338 //! Get the value of the CubeTextureObjChunk::_sfPosZImage field.
339 Image
* CubeTextureObjChunkBase::getPosZImage(void) const
341 return _sfPosZImage
.getValue();
344 //! Set the value of the CubeTextureObjChunk::_sfPosZImage field.
345 void CubeTextureObjChunkBase::setPosZImage(Image
* const value
)
347 editSField(PosZImageFieldMask
);
349 _sfPosZImage
.setValue(value
);
353 //! Get the CubeTextureObjChunk::_sfPosXImage field.
354 const SFUnrecImagePtr
*CubeTextureObjChunkBase::getSFPosXImage(void) const
356 return &_sfPosXImage
;
359 SFUnrecImagePtr
*CubeTextureObjChunkBase::editSFPosXImage (void)
361 editSField(PosXImageFieldMask
);
363 return &_sfPosXImage
;
366 //! Get the value of the CubeTextureObjChunk::_sfPosXImage field.
367 Image
* CubeTextureObjChunkBase::getPosXImage(void) const
369 return _sfPosXImage
.getValue();
372 //! Set the value of the CubeTextureObjChunk::_sfPosXImage field.
373 void CubeTextureObjChunkBase::setPosXImage(Image
* const value
)
375 editSField(PosXImageFieldMask
);
377 _sfPosXImage
.setValue(value
);
381 //! Get the CubeTextureObjChunk::_sfNegXImage field.
382 const SFUnrecImagePtr
*CubeTextureObjChunkBase::getSFNegXImage(void) const
384 return &_sfNegXImage
;
387 SFUnrecImagePtr
*CubeTextureObjChunkBase::editSFNegXImage (void)
389 editSField(NegXImageFieldMask
);
391 return &_sfNegXImage
;
394 //! Get the value of the CubeTextureObjChunk::_sfNegXImage field.
395 Image
* CubeTextureObjChunkBase::getNegXImage(void) const
397 return _sfNegXImage
.getValue();
400 //! Set the value of the CubeTextureObjChunk::_sfNegXImage field.
401 void CubeTextureObjChunkBase::setNegXImage(Image
* const value
)
403 editSField(NegXImageFieldMask
);
405 _sfNegXImage
.setValue(value
);
409 //! Get the CubeTextureObjChunk::_sfPosYImage field.
410 const SFUnrecImagePtr
*CubeTextureObjChunkBase::getSFPosYImage(void) const
412 return &_sfPosYImage
;
415 SFUnrecImagePtr
*CubeTextureObjChunkBase::editSFPosYImage (void)
417 editSField(PosYImageFieldMask
);
419 return &_sfPosYImage
;
422 //! Get the value of the CubeTextureObjChunk::_sfPosYImage field.
423 Image
* CubeTextureObjChunkBase::getPosYImage(void) const
425 return _sfPosYImage
.getValue();
428 //! Set the value of the CubeTextureObjChunk::_sfPosYImage field.
429 void CubeTextureObjChunkBase::setPosYImage(Image
* const value
)
431 editSField(PosYImageFieldMask
);
433 _sfPosYImage
.setValue(value
);
437 //! Get the CubeTextureObjChunk::_sfNegYImage field.
438 const SFUnrecImagePtr
*CubeTextureObjChunkBase::getSFNegYImage(void) const
440 return &_sfNegYImage
;
443 SFUnrecImagePtr
*CubeTextureObjChunkBase::editSFNegYImage (void)
445 editSField(NegYImageFieldMask
);
447 return &_sfNegYImage
;
450 //! Get the value of the CubeTextureObjChunk::_sfNegYImage field.
451 Image
* CubeTextureObjChunkBase::getNegYImage(void) const
453 return _sfNegYImage
.getValue();
456 //! Set the value of the CubeTextureObjChunk::_sfNegYImage field.
457 void CubeTextureObjChunkBase::setNegYImage(Image
* const value
)
459 editSField(NegYImageFieldMask
);
461 _sfNegYImage
.setValue(value
);
469 /*------------------------------ access -----------------------------------*/
471 SizeT
CubeTextureObjChunkBase::getBinSize(ConstFieldMaskArg whichField
)
473 SizeT returnValue
= Inherited::getBinSize(whichField
);
475 if(FieldBits::NoField
!= (PosZImageFieldMask
& whichField
))
477 returnValue
+= _sfPosZImage
.getBinSize();
479 if(FieldBits::NoField
!= (PosXImageFieldMask
& whichField
))
481 returnValue
+= _sfPosXImage
.getBinSize();
483 if(FieldBits::NoField
!= (NegXImageFieldMask
& whichField
))
485 returnValue
+= _sfNegXImage
.getBinSize();
487 if(FieldBits::NoField
!= (PosYImageFieldMask
& whichField
))
489 returnValue
+= _sfPosYImage
.getBinSize();
491 if(FieldBits::NoField
!= (NegYImageFieldMask
& whichField
))
493 returnValue
+= _sfNegYImage
.getBinSize();
499 void CubeTextureObjChunkBase::copyToBin(BinaryDataHandler
&pMem
,
500 ConstFieldMaskArg whichField
)
502 Inherited::copyToBin(pMem
, whichField
);
504 if(FieldBits::NoField
!= (PosZImageFieldMask
& whichField
))
506 _sfPosZImage
.copyToBin(pMem
);
508 if(FieldBits::NoField
!= (PosXImageFieldMask
& whichField
))
510 _sfPosXImage
.copyToBin(pMem
);
512 if(FieldBits::NoField
!= (NegXImageFieldMask
& whichField
))
514 _sfNegXImage
.copyToBin(pMem
);
516 if(FieldBits::NoField
!= (PosYImageFieldMask
& whichField
))
518 _sfPosYImage
.copyToBin(pMem
);
520 if(FieldBits::NoField
!= (NegYImageFieldMask
& whichField
))
522 _sfNegYImage
.copyToBin(pMem
);
526 void CubeTextureObjChunkBase::copyFromBin(BinaryDataHandler
&pMem
,
527 ConstFieldMaskArg whichField
)
529 Inherited::copyFromBin(pMem
, whichField
);
531 if(FieldBits::NoField
!= (PosZImageFieldMask
& whichField
))
533 editSField(PosZImageFieldMask
);
534 _sfPosZImage
.copyFromBin(pMem
);
536 if(FieldBits::NoField
!= (PosXImageFieldMask
& whichField
))
538 editSField(PosXImageFieldMask
);
539 _sfPosXImage
.copyFromBin(pMem
);
541 if(FieldBits::NoField
!= (NegXImageFieldMask
& whichField
))
543 editSField(NegXImageFieldMask
);
544 _sfNegXImage
.copyFromBin(pMem
);
546 if(FieldBits::NoField
!= (PosYImageFieldMask
& whichField
))
548 editSField(PosYImageFieldMask
);
549 _sfPosYImage
.copyFromBin(pMem
);
551 if(FieldBits::NoField
!= (NegYImageFieldMask
& whichField
))
553 editSField(NegYImageFieldMask
);
554 _sfNegYImage
.copyFromBin(pMem
);
558 //! create a new instance of the class
559 CubeTextureObjChunkTransitPtr
CubeTextureObjChunkBase::createLocal(BitVector bFlags
)
561 CubeTextureObjChunkTransitPtr fc
;
563 if(getClassType().getPrototype() != NULL
)
565 FieldContainerTransitPtr tmpPtr
=
566 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
568 fc
= dynamic_pointer_cast
<CubeTextureObjChunk
>(tmpPtr
);
574 //! create a new instance of the class, copy the container flags
575 CubeTextureObjChunkTransitPtr
CubeTextureObjChunkBase::createDependent(BitVector bFlags
)
577 CubeTextureObjChunkTransitPtr fc
;
579 if(getClassType().getPrototype() != NULL
)
581 FieldContainerTransitPtr tmpPtr
=
582 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
584 fc
= dynamic_pointer_cast
<CubeTextureObjChunk
>(tmpPtr
);
590 //! create a new instance of the class
591 CubeTextureObjChunkTransitPtr
CubeTextureObjChunkBase::create(void)
593 CubeTextureObjChunkTransitPtr fc
;
595 if(getClassType().getPrototype() != NULL
)
597 FieldContainerTransitPtr tmpPtr
=
598 getClassType().getPrototype()-> shallowCopy();
600 fc
= dynamic_pointer_cast
<CubeTextureObjChunk
>(tmpPtr
);
606 CubeTextureObjChunk
*CubeTextureObjChunkBase::createEmptyLocal(BitVector bFlags
)
608 CubeTextureObjChunk
*returnValue
;
610 newPtr
<CubeTextureObjChunk
>(returnValue
, bFlags
);
612 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
617 //! create an empty new instance of the class, do not copy the prototype
618 CubeTextureObjChunk
*CubeTextureObjChunkBase::createEmpty(void)
620 CubeTextureObjChunk
*returnValue
;
622 newPtr
<CubeTextureObjChunk
>(returnValue
, Thread::getCurrentLocalFlags());
624 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
625 ~Thread::getCurrentLocalFlags();
631 FieldContainerTransitPtr
CubeTextureObjChunkBase::shallowCopyLocal(
632 BitVector bFlags
) const
634 CubeTextureObjChunk
*tmpPtr
;
636 newPtr(tmpPtr
, dynamic_cast<const CubeTextureObjChunk
*>(this), bFlags
);
638 FieldContainerTransitPtr
returnValue(tmpPtr
);
640 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
645 FieldContainerTransitPtr
CubeTextureObjChunkBase::shallowCopyDependent(
646 BitVector bFlags
) const
648 CubeTextureObjChunk
*tmpPtr
;
650 newPtr(tmpPtr
, dynamic_cast<const CubeTextureObjChunk
*>(this), ~bFlags
);
652 FieldContainerTransitPtr
returnValue(tmpPtr
);
654 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
659 FieldContainerTransitPtr
CubeTextureObjChunkBase::shallowCopy(void) const
661 CubeTextureObjChunk
*tmpPtr
;
664 dynamic_cast<const CubeTextureObjChunk
*>(this),
665 Thread::getCurrentLocalFlags());
667 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
669 FieldContainerTransitPtr
returnValue(tmpPtr
);
677 /*------------------------- constructors ----------------------------------*/
679 CubeTextureObjChunkBase::CubeTextureObjChunkBase(void) :
689 CubeTextureObjChunkBase::CubeTextureObjChunkBase(const CubeTextureObjChunkBase
&source
) :
700 /*-------------------------- destructors ----------------------------------*/
702 CubeTextureObjChunkBase::~CubeTextureObjChunkBase(void)
706 void CubeTextureObjChunkBase::onCreate(const CubeTextureObjChunk
*source
)
708 Inherited::onCreate(source
);
712 CubeTextureObjChunk
*pThis
= static_cast<CubeTextureObjChunk
*>(this);
714 pThis
->setPosZImage(source
->getPosZImage());
716 pThis
->setPosXImage(source
->getPosXImage());
718 pThis
->setNegXImage(source
->getNegXImage());
720 pThis
->setPosYImage(source
->getPosYImage());
722 pThis
->setNegYImage(source
->getNegYImage());
726 GetFieldHandlePtr
CubeTextureObjChunkBase::getHandlePosZImage (void) const
728 SFUnrecImagePtr::GetHandlePtr
returnValue(
729 new SFUnrecImagePtr::GetHandle(
731 this->getType().getFieldDesc(PosZImageFieldId
),
732 const_cast<CubeTextureObjChunkBase
*>(this)));
737 EditFieldHandlePtr
CubeTextureObjChunkBase::editHandlePosZImage (void)
739 SFUnrecImagePtr::EditHandlePtr
returnValue(
740 new SFUnrecImagePtr::EditHandle(
742 this->getType().getFieldDesc(PosZImageFieldId
),
745 returnValue
->setSetMethod(
746 boost::bind(&CubeTextureObjChunk::setPosZImage
,
747 static_cast<CubeTextureObjChunk
*>(this), _1
));
749 editSField(PosZImageFieldMask
);
754 GetFieldHandlePtr
CubeTextureObjChunkBase::getHandlePosXImage (void) const
756 SFUnrecImagePtr::GetHandlePtr
returnValue(
757 new SFUnrecImagePtr::GetHandle(
759 this->getType().getFieldDesc(PosXImageFieldId
),
760 const_cast<CubeTextureObjChunkBase
*>(this)));
765 EditFieldHandlePtr
CubeTextureObjChunkBase::editHandlePosXImage (void)
767 SFUnrecImagePtr::EditHandlePtr
returnValue(
768 new SFUnrecImagePtr::EditHandle(
770 this->getType().getFieldDesc(PosXImageFieldId
),
773 returnValue
->setSetMethod(
774 boost::bind(&CubeTextureObjChunk::setPosXImage
,
775 static_cast<CubeTextureObjChunk
*>(this), _1
));
777 editSField(PosXImageFieldMask
);
782 GetFieldHandlePtr
CubeTextureObjChunkBase::getHandleNegXImage (void) const
784 SFUnrecImagePtr::GetHandlePtr
returnValue(
785 new SFUnrecImagePtr::GetHandle(
787 this->getType().getFieldDesc(NegXImageFieldId
),
788 const_cast<CubeTextureObjChunkBase
*>(this)));
793 EditFieldHandlePtr
CubeTextureObjChunkBase::editHandleNegXImage (void)
795 SFUnrecImagePtr::EditHandlePtr
returnValue(
796 new SFUnrecImagePtr::EditHandle(
798 this->getType().getFieldDesc(NegXImageFieldId
),
801 returnValue
->setSetMethod(
802 boost::bind(&CubeTextureObjChunk::setNegXImage
,
803 static_cast<CubeTextureObjChunk
*>(this), _1
));
805 editSField(NegXImageFieldMask
);
810 GetFieldHandlePtr
CubeTextureObjChunkBase::getHandlePosYImage (void) const
812 SFUnrecImagePtr::GetHandlePtr
returnValue(
813 new SFUnrecImagePtr::GetHandle(
815 this->getType().getFieldDesc(PosYImageFieldId
),
816 const_cast<CubeTextureObjChunkBase
*>(this)));
821 EditFieldHandlePtr
CubeTextureObjChunkBase::editHandlePosYImage (void)
823 SFUnrecImagePtr::EditHandlePtr
returnValue(
824 new SFUnrecImagePtr::EditHandle(
826 this->getType().getFieldDesc(PosYImageFieldId
),
829 returnValue
->setSetMethod(
830 boost::bind(&CubeTextureObjChunk::setPosYImage
,
831 static_cast<CubeTextureObjChunk
*>(this), _1
));
833 editSField(PosYImageFieldMask
);
838 GetFieldHandlePtr
CubeTextureObjChunkBase::getHandleNegYImage (void) const
840 SFUnrecImagePtr::GetHandlePtr
returnValue(
841 new SFUnrecImagePtr::GetHandle(
843 this->getType().getFieldDesc(NegYImageFieldId
),
844 const_cast<CubeTextureObjChunkBase
*>(this)));
849 EditFieldHandlePtr
CubeTextureObjChunkBase::editHandleNegYImage (void)
851 SFUnrecImagePtr::EditHandlePtr
returnValue(
852 new SFUnrecImagePtr::EditHandle(
854 this->getType().getFieldDesc(NegYImageFieldId
),
857 returnValue
->setSetMethod(
858 boost::bind(&CubeTextureObjChunk::setNegYImage
,
859 static_cast<CubeTextureObjChunk
*>(this), _1
));
861 editSField(NegYImageFieldMask
);
867 #ifdef OSG_MT_CPTR_ASPECT
868 void CubeTextureObjChunkBase::execSyncV( FieldContainer
&oFrom
,
869 ConstFieldMaskArg whichField
,
870 AspectOffsetStore
&oOffsets
,
871 ConstFieldMaskArg syncMode
,
872 const UInt32 uiSyncInfo
)
874 CubeTextureObjChunk
*pThis
= static_cast<CubeTextureObjChunk
*>(this);
876 pThis
->execSync(static_cast<CubeTextureObjChunk
*>(&oFrom
),
885 #ifdef OSG_MT_CPTR_ASPECT
886 FieldContainer
*CubeTextureObjChunkBase::createAspectCopy(
887 const FieldContainer
*pRefAspect
) const
889 CubeTextureObjChunk
*returnValue
;
891 newAspectCopy(returnValue
,
892 dynamic_cast<const CubeTextureObjChunk
*>(pRefAspect
),
893 dynamic_cast<const CubeTextureObjChunk
*>(this));
899 void CubeTextureObjChunkBase::resolveLinks(void)
901 Inherited::resolveLinks();
903 static_cast<CubeTextureObjChunk
*>(this)->setPosZImage(NULL
);
905 static_cast<CubeTextureObjChunk
*>(this)->setPosXImage(NULL
);
907 static_cast<CubeTextureObjChunk
*>(this)->setNegXImage(NULL
);
909 static_cast<CubeTextureObjChunk
*>(this)->setPosYImage(NULL
);
911 static_cast<CubeTextureObjChunk
*>(this)->setNegYImage(NULL
);