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 TextureBackground!
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 "OSGTextureBaseChunk.h" // Texture Class
67 #include "OSGTextureBackgroundBase.h"
68 #include "OSGTextureBackground.h"
70 #include <boost/bind.hpp>
74 /***************************************************************************\
76 \***************************************************************************/
78 /*! \class OSG::TextureBackground
79 A textured background e.g for distortion corrected fast live video from a
80 camera with known intrinsic parameters.
83 /***************************************************************************\
84 * Field Documentation *
85 \***************************************************************************/
87 /*! \var Color4f TextureBackgroundBase::_sfColor
91 /*! \var TextureBaseChunk * TextureBackgroundBase::_sfTexture
95 /*! \var Pnt2f TextureBackgroundBase::_mfTexCoords
99 /*! \var Real32 TextureBackgroundBase::_sfRadialDistortion
103 /*! \var Vec2f TextureBackgroundBase::_sfCenterOfDistortion
107 /*! \var UInt16 TextureBackgroundBase::_sfHor
108 Horizontal subdivision.
111 /*! \var UInt16 TextureBackgroundBase::_sfVert
112 Vertical subdivision.
116 /***************************************************************************\
117 * FieldType/FieldTrait Instantiation *
118 \***************************************************************************/
120 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
121 PointerType FieldTraits
<TextureBackground
*, nsOSG
>::_type(
122 "TextureBackgroundPtr",
124 TextureBackground::getClassType(),
128 OSG_FIELDTRAITS_GETTYPE_NS(TextureBackground
*, nsOSG
)
130 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
135 /***************************************************************************\
136 * Field Description *
137 \***************************************************************************/
139 void TextureBackgroundBase::classDescInserter(TypeObject
&oType
)
141 FieldDescriptionBase
*pDesc
= NULL
;
144 pDesc
= new SFColor4f::Description(
145 SFColor4f::getClassType(),
148 ColorFieldId
, ColorFieldMask
,
150 (Field::SFDefaultFlags
| Field::FStdAccess
),
151 static_cast<FieldEditMethodSig
>(&TextureBackground::editHandleColor
),
152 static_cast<FieldGetMethodSig
>(&TextureBackground::getHandleColor
));
154 oType
.addInitialDesc(pDesc
);
156 pDesc
= new SFUnrecTextureBaseChunkPtr::Description(
157 SFUnrecTextureBaseChunkPtr::getClassType(),
160 TextureFieldId
, TextureFieldMask
,
162 (Field::SFDefaultFlags
| Field::FStdAccess
),
163 static_cast<FieldEditMethodSig
>(&TextureBackground::editHandleTexture
),
164 static_cast<FieldGetMethodSig
>(&TextureBackground::getHandleTexture
));
166 oType
.addInitialDesc(pDesc
);
168 pDesc
= new MFPnt2f::Description(
169 MFPnt2f::getClassType(),
172 TexCoordsFieldId
, TexCoordsFieldMask
,
174 (Field::MFDefaultFlags
| Field::FStdAccess
),
175 static_cast<FieldEditMethodSig
>(&TextureBackground::editHandleTexCoords
),
176 static_cast<FieldGetMethodSig
>(&TextureBackground::getHandleTexCoords
));
178 oType
.addInitialDesc(pDesc
);
180 pDesc
= new SFReal32::Description(
181 SFReal32::getClassType(),
184 RadialDistortionFieldId
, RadialDistortionFieldMask
,
186 (Field::SFDefaultFlags
| Field::FStdAccess
),
187 static_cast<FieldEditMethodSig
>(&TextureBackground::editHandleRadialDistortion
),
188 static_cast<FieldGetMethodSig
>(&TextureBackground::getHandleRadialDistortion
));
190 oType
.addInitialDesc(pDesc
);
192 pDesc
= new SFVec2f::Description(
193 SFVec2f::getClassType(),
194 "centerOfDistortion",
196 CenterOfDistortionFieldId
, CenterOfDistortionFieldMask
,
198 (Field::SFDefaultFlags
| Field::FStdAccess
),
199 static_cast<FieldEditMethodSig
>(&TextureBackground::editHandleCenterOfDistortion
),
200 static_cast<FieldGetMethodSig
>(&TextureBackground::getHandleCenterOfDistortion
));
202 oType
.addInitialDesc(pDesc
);
204 pDesc
= new SFUInt16::Description(
205 SFUInt16::getClassType(),
207 "Horizontal subdivision.\n",
208 HorFieldId
, HorFieldMask
,
210 (Field::SFDefaultFlags
| Field::FStdAccess
),
211 static_cast<FieldEditMethodSig
>(&TextureBackground::editHandleHor
),
212 static_cast<FieldGetMethodSig
>(&TextureBackground::getHandleHor
));
214 oType
.addInitialDesc(pDesc
);
216 pDesc
= new SFUInt16::Description(
217 SFUInt16::getClassType(),
219 "Vertical subdivision.\n",
220 VertFieldId
, VertFieldMask
,
222 (Field::SFDefaultFlags
| Field::FStdAccess
),
223 static_cast<FieldEditMethodSig
>(&TextureBackground::editHandleVert
),
224 static_cast<FieldGetMethodSig
>(&TextureBackground::getHandleVert
));
226 oType
.addInitialDesc(pDesc
);
230 TextureBackgroundBase::TypeObject
TextureBackgroundBase::_type(
231 TextureBackgroundBase::getClassname(),
232 Inherited::getClassname(),
235 reinterpret_cast<PrototypeCreateF
>(&TextureBackgroundBase::createEmptyLocal
),
236 reinterpret_cast<InitContainerF
>(&TextureBackground::initMethod
),
237 reinterpret_cast<ExitContainerF
>(&TextureBackground::exitMethod
),
238 reinterpret_cast<InitalInsertDescFunc
>(
239 reinterpret_cast<void *>(&TextureBackground::classDescInserter
)),
242 "<?xml version=\"1.0\"?>\n"
245 " name=\"TextureBackground\"\n"
246 " parent=\"Background\"\n"
247 " library=\"Window\"\n"
248 " pointerfieldtypes=\"single\"\n"
249 " structure=\"concrete\"\n"
250 " systemcomponent=\"true\"\n"
251 " parentsystemcomponent=\"true\"\n"
252 " decoratable=\"false\"\n"
253 " useLocalIncludes=\"false\"\n"
254 " docGroupBase=\"GrpWindowBackground\"\n"
256 " A textured background e.g for distortion corrected fast live video from a\n"
257 " camera with known intrinsic parameters.\n"
259 "\t name=\"color\"\n"
260 "\t type=\"Color4f\"\n"
261 "\t cardinality=\"single\"\n"
262 "\t visibility=\"external\"\n"
263 "\t access=\"public\"\n"
264 "\t defaultValue=\"1.f, 1.f, 1.f, 0.f\"\n"
268 "\t name=\"texture\"\n"
269 "\t type=\"TextureBaseChunkPtr\"\n"
270 "\t cardinality=\"single\"\n"
271 "\t visibility=\"external\"\n"
272 "\t access=\"public\"\n"
276 "\t name=\"texCoords\"\n"
277 "\t type=\"Pnt2f\"\n"
278 "\t cardinality=\"multi\"\n"
279 "\t visibility=\"external\"\n"
280 "\t access=\"public\"\n"
284 "\t name=\"radialDistortion\"\n"
285 "\t type=\"Real32\"\n"
286 "\t cardinality=\"single\"\n"
287 "\t visibility=\"external\"\n"
288 "\t defaultValue=\"0\"\n"
289 "\t access=\"public\"\n"
293 "\t name=\"centerOfDistortion\"\n"
294 "\t type=\"Vec2f\"\n"
295 "\t cardinality=\"single\"\n"
296 "\t visibility=\"external\"\n"
297 "\t defaultValue=\"0.5, 0.5\"\n"
298 "\t access=\"public\"\n"
303 "\t type=\"UInt16\"\n"
304 "\t cardinality=\"single\"\n"
305 "\t visibility=\"external\"\n"
306 "\t defaultValue=\"2\"\n"
307 "\t access=\"public\"\n"
309 "\tHorizontal subdivision.\n"
313 "\t type=\"UInt16\"\n"
314 "\t cardinality=\"single\"\n"
315 "\t visibility=\"external\"\n"
316 "\t defaultValue=\"2\"\n"
317 "\t access=\"public\"\n"
319 "\tVertical subdivision.\n"
321 "</FieldContainer>\n",
322 "A textured background e.g for distortion corrected fast live video from a\n"
323 "camera with known intrinsic parameters.\n"
326 /*------------------------------ get -----------------------------------*/
328 FieldContainerType
&TextureBackgroundBase::getType(void)
333 const FieldContainerType
&TextureBackgroundBase::getType(void) const
338 UInt32
TextureBackgroundBase::getContainerSize(void) const
340 return sizeof(TextureBackground
);
343 /*------------------------- decorator get ------------------------------*/
346 SFColor4f
*TextureBackgroundBase::editSFColor(void)
348 editSField(ColorFieldMask
);
353 const SFColor4f
*TextureBackgroundBase::getSFColor(void) const
359 //! Get the TextureBackground::_sfTexture field.
360 const SFUnrecTextureBaseChunkPtr
*TextureBackgroundBase::getSFTexture(void) const
365 SFUnrecTextureBaseChunkPtr
*TextureBackgroundBase::editSFTexture (void)
367 editSField(TextureFieldMask
);
372 //! Get the value of the TextureBackground::_sfTexture field.
373 TextureBaseChunk
* TextureBackgroundBase::getTexture(void) const
375 return _sfTexture
.getValue();
378 //! Set the value of the TextureBackground::_sfTexture field.
379 void TextureBackgroundBase::setTexture(TextureBaseChunk
* const value
)
381 editSField(TextureFieldMask
);
383 _sfTexture
.setValue(value
);
387 MFPnt2f
*TextureBackgroundBase::editMFTexCoords(void)
389 editMField(TexCoordsFieldMask
, _mfTexCoords
);
391 return &_mfTexCoords
;
394 const MFPnt2f
*TextureBackgroundBase::getMFTexCoords(void) const
396 return &_mfTexCoords
;
400 SFReal32
*TextureBackgroundBase::editSFRadialDistortion(void)
402 editSField(RadialDistortionFieldMask
);
404 return &_sfRadialDistortion
;
407 const SFReal32
*TextureBackgroundBase::getSFRadialDistortion(void) const
409 return &_sfRadialDistortion
;
413 SFVec2f
*TextureBackgroundBase::editSFCenterOfDistortion(void)
415 editSField(CenterOfDistortionFieldMask
);
417 return &_sfCenterOfDistortion
;
420 const SFVec2f
*TextureBackgroundBase::getSFCenterOfDistortion(void) const
422 return &_sfCenterOfDistortion
;
426 SFUInt16
*TextureBackgroundBase::editSFHor(void)
428 editSField(HorFieldMask
);
433 const SFUInt16
*TextureBackgroundBase::getSFHor(void) const
439 SFUInt16
*TextureBackgroundBase::editSFVert(void)
441 editSField(VertFieldMask
);
446 const SFUInt16
*TextureBackgroundBase::getSFVert(void) const
456 /*------------------------------ access -----------------------------------*/
458 SizeT
TextureBackgroundBase::getBinSize(ConstFieldMaskArg whichField
)
460 SizeT returnValue
= Inherited::getBinSize(whichField
);
462 if(FieldBits::NoField
!= (ColorFieldMask
& whichField
))
464 returnValue
+= _sfColor
.getBinSize();
466 if(FieldBits::NoField
!= (TextureFieldMask
& whichField
))
468 returnValue
+= _sfTexture
.getBinSize();
470 if(FieldBits::NoField
!= (TexCoordsFieldMask
& whichField
))
472 returnValue
+= _mfTexCoords
.getBinSize();
474 if(FieldBits::NoField
!= (RadialDistortionFieldMask
& whichField
))
476 returnValue
+= _sfRadialDistortion
.getBinSize();
478 if(FieldBits::NoField
!= (CenterOfDistortionFieldMask
& whichField
))
480 returnValue
+= _sfCenterOfDistortion
.getBinSize();
482 if(FieldBits::NoField
!= (HorFieldMask
& whichField
))
484 returnValue
+= _sfHor
.getBinSize();
486 if(FieldBits::NoField
!= (VertFieldMask
& whichField
))
488 returnValue
+= _sfVert
.getBinSize();
494 void TextureBackgroundBase::copyToBin(BinaryDataHandler
&pMem
,
495 ConstFieldMaskArg whichField
)
497 Inherited::copyToBin(pMem
, whichField
);
499 if(FieldBits::NoField
!= (ColorFieldMask
& whichField
))
501 _sfColor
.copyToBin(pMem
);
503 if(FieldBits::NoField
!= (TextureFieldMask
& whichField
))
505 _sfTexture
.copyToBin(pMem
);
507 if(FieldBits::NoField
!= (TexCoordsFieldMask
& whichField
))
509 _mfTexCoords
.copyToBin(pMem
);
511 if(FieldBits::NoField
!= (RadialDistortionFieldMask
& whichField
))
513 _sfRadialDistortion
.copyToBin(pMem
);
515 if(FieldBits::NoField
!= (CenterOfDistortionFieldMask
& whichField
))
517 _sfCenterOfDistortion
.copyToBin(pMem
);
519 if(FieldBits::NoField
!= (HorFieldMask
& whichField
))
521 _sfHor
.copyToBin(pMem
);
523 if(FieldBits::NoField
!= (VertFieldMask
& whichField
))
525 _sfVert
.copyToBin(pMem
);
529 void TextureBackgroundBase::copyFromBin(BinaryDataHandler
&pMem
,
530 ConstFieldMaskArg whichField
)
532 Inherited::copyFromBin(pMem
, whichField
);
534 if(FieldBits::NoField
!= (ColorFieldMask
& whichField
))
536 editSField(ColorFieldMask
);
537 _sfColor
.copyFromBin(pMem
);
539 if(FieldBits::NoField
!= (TextureFieldMask
& whichField
))
541 editSField(TextureFieldMask
);
542 _sfTexture
.copyFromBin(pMem
);
544 if(FieldBits::NoField
!= (TexCoordsFieldMask
& whichField
))
546 editMField(TexCoordsFieldMask
, _mfTexCoords
);
547 _mfTexCoords
.copyFromBin(pMem
);
549 if(FieldBits::NoField
!= (RadialDistortionFieldMask
& whichField
))
551 editSField(RadialDistortionFieldMask
);
552 _sfRadialDistortion
.copyFromBin(pMem
);
554 if(FieldBits::NoField
!= (CenterOfDistortionFieldMask
& whichField
))
556 editSField(CenterOfDistortionFieldMask
);
557 _sfCenterOfDistortion
.copyFromBin(pMem
);
559 if(FieldBits::NoField
!= (HorFieldMask
& whichField
))
561 editSField(HorFieldMask
);
562 _sfHor
.copyFromBin(pMem
);
564 if(FieldBits::NoField
!= (VertFieldMask
& whichField
))
566 editSField(VertFieldMask
);
567 _sfVert
.copyFromBin(pMem
);
571 //! create a new instance of the class
572 TextureBackgroundTransitPtr
TextureBackgroundBase::createLocal(BitVector bFlags
)
574 TextureBackgroundTransitPtr fc
;
576 if(getClassType().getPrototype() != NULL
)
578 FieldContainerTransitPtr tmpPtr
=
579 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
581 fc
= dynamic_pointer_cast
<TextureBackground
>(tmpPtr
);
587 //! create a new instance of the class, copy the container flags
588 TextureBackgroundTransitPtr
TextureBackgroundBase::createDependent(BitVector bFlags
)
590 TextureBackgroundTransitPtr fc
;
592 if(getClassType().getPrototype() != NULL
)
594 FieldContainerTransitPtr tmpPtr
=
595 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
597 fc
= dynamic_pointer_cast
<TextureBackground
>(tmpPtr
);
603 //! create a new instance of the class
604 TextureBackgroundTransitPtr
TextureBackgroundBase::create(void)
606 TextureBackgroundTransitPtr fc
;
608 if(getClassType().getPrototype() != NULL
)
610 FieldContainerTransitPtr tmpPtr
=
611 getClassType().getPrototype()-> shallowCopy();
613 fc
= dynamic_pointer_cast
<TextureBackground
>(tmpPtr
);
619 TextureBackground
*TextureBackgroundBase::createEmptyLocal(BitVector bFlags
)
621 TextureBackground
*returnValue
;
623 newPtr
<TextureBackground
>(returnValue
, bFlags
);
625 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
630 //! create an empty new instance of the class, do not copy the prototype
631 TextureBackground
*TextureBackgroundBase::createEmpty(void)
633 TextureBackground
*returnValue
;
635 newPtr
<TextureBackground
>(returnValue
, Thread::getCurrentLocalFlags());
637 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
638 ~Thread::getCurrentLocalFlags();
644 FieldContainerTransitPtr
TextureBackgroundBase::shallowCopyLocal(
645 BitVector bFlags
) const
647 TextureBackground
*tmpPtr
;
649 newPtr(tmpPtr
, dynamic_cast<const TextureBackground
*>(this), bFlags
);
651 FieldContainerTransitPtr
returnValue(tmpPtr
);
653 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
658 FieldContainerTransitPtr
TextureBackgroundBase::shallowCopyDependent(
659 BitVector bFlags
) const
661 TextureBackground
*tmpPtr
;
663 newPtr(tmpPtr
, dynamic_cast<const TextureBackground
*>(this), ~bFlags
);
665 FieldContainerTransitPtr
returnValue(tmpPtr
);
667 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
672 FieldContainerTransitPtr
TextureBackgroundBase::shallowCopy(void) const
674 TextureBackground
*tmpPtr
;
677 dynamic_cast<const TextureBackground
*>(this),
678 Thread::getCurrentLocalFlags());
680 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
682 FieldContainerTransitPtr
returnValue(tmpPtr
);
690 /*------------------------- constructors ----------------------------------*/
692 TextureBackgroundBase::TextureBackgroundBase(void) :
694 _sfColor (Color4f(1.f
, 1.f
, 1.f
, 0.f
)),
697 _sfRadialDistortion (Real32(0)),
698 _sfCenterOfDistortion (Vec2f(0.5, 0.5)),
704 TextureBackgroundBase::TextureBackgroundBase(const TextureBackgroundBase
&source
) :
706 _sfColor (source
._sfColor
),
708 _mfTexCoords (source
._mfTexCoords
),
709 _sfRadialDistortion (source
._sfRadialDistortion
),
710 _sfCenterOfDistortion (source
._sfCenterOfDistortion
),
711 _sfHor (source
._sfHor
),
712 _sfVert (source
._sfVert
)
717 /*-------------------------- destructors ----------------------------------*/
719 TextureBackgroundBase::~TextureBackgroundBase(void)
723 void TextureBackgroundBase::onCreate(const TextureBackground
*source
)
725 Inherited::onCreate(source
);
729 TextureBackground
*pThis
= static_cast<TextureBackground
*>(this);
731 pThis
->setTexture(source
->getTexture());
735 GetFieldHandlePtr
TextureBackgroundBase::getHandleColor (void) const
737 SFColor4f::GetHandlePtr
returnValue(
738 new SFColor4f::GetHandle(
740 this->getType().getFieldDesc(ColorFieldId
),
741 const_cast<TextureBackgroundBase
*>(this)));
746 EditFieldHandlePtr
TextureBackgroundBase::editHandleColor (void)
748 SFColor4f::EditHandlePtr
returnValue(
749 new SFColor4f::EditHandle(
751 this->getType().getFieldDesc(ColorFieldId
),
755 editSField(ColorFieldMask
);
760 GetFieldHandlePtr
TextureBackgroundBase::getHandleTexture (void) const
762 SFUnrecTextureBaseChunkPtr::GetHandlePtr
returnValue(
763 new SFUnrecTextureBaseChunkPtr::GetHandle(
765 this->getType().getFieldDesc(TextureFieldId
),
766 const_cast<TextureBackgroundBase
*>(this)));
771 EditFieldHandlePtr
TextureBackgroundBase::editHandleTexture (void)
773 SFUnrecTextureBaseChunkPtr::EditHandlePtr
returnValue(
774 new SFUnrecTextureBaseChunkPtr::EditHandle(
776 this->getType().getFieldDesc(TextureFieldId
),
779 returnValue
->setSetMethod(
780 boost::bind(&TextureBackground::setTexture
,
781 static_cast<TextureBackground
*>(this), _1
));
783 editSField(TextureFieldMask
);
788 GetFieldHandlePtr
TextureBackgroundBase::getHandleTexCoords (void) const
790 MFPnt2f::GetHandlePtr
returnValue(
791 new MFPnt2f::GetHandle(
793 this->getType().getFieldDesc(TexCoordsFieldId
),
794 const_cast<TextureBackgroundBase
*>(this)));
799 EditFieldHandlePtr
TextureBackgroundBase::editHandleTexCoords (void)
801 MFPnt2f::EditHandlePtr
returnValue(
802 new MFPnt2f::EditHandle(
804 this->getType().getFieldDesc(TexCoordsFieldId
),
808 editMField(TexCoordsFieldMask
, _mfTexCoords
);
813 GetFieldHandlePtr
TextureBackgroundBase::getHandleRadialDistortion (void) const
815 SFReal32::GetHandlePtr
returnValue(
816 new SFReal32::GetHandle(
817 &_sfRadialDistortion
,
818 this->getType().getFieldDesc(RadialDistortionFieldId
),
819 const_cast<TextureBackgroundBase
*>(this)));
824 EditFieldHandlePtr
TextureBackgroundBase::editHandleRadialDistortion(void)
826 SFReal32::EditHandlePtr
returnValue(
827 new SFReal32::EditHandle(
828 &_sfRadialDistortion
,
829 this->getType().getFieldDesc(RadialDistortionFieldId
),
833 editSField(RadialDistortionFieldMask
);
838 GetFieldHandlePtr
TextureBackgroundBase::getHandleCenterOfDistortion (void) const
840 SFVec2f::GetHandlePtr
returnValue(
841 new SFVec2f::GetHandle(
842 &_sfCenterOfDistortion
,
843 this->getType().getFieldDesc(CenterOfDistortionFieldId
),
844 const_cast<TextureBackgroundBase
*>(this)));
849 EditFieldHandlePtr
TextureBackgroundBase::editHandleCenterOfDistortion(void)
851 SFVec2f::EditHandlePtr
returnValue(
852 new SFVec2f::EditHandle(
853 &_sfCenterOfDistortion
,
854 this->getType().getFieldDesc(CenterOfDistortionFieldId
),
858 editSField(CenterOfDistortionFieldMask
);
863 GetFieldHandlePtr
TextureBackgroundBase::getHandleHor (void) const
865 SFUInt16::GetHandlePtr
returnValue(
866 new SFUInt16::GetHandle(
868 this->getType().getFieldDesc(HorFieldId
),
869 const_cast<TextureBackgroundBase
*>(this)));
874 EditFieldHandlePtr
TextureBackgroundBase::editHandleHor (void)
876 SFUInt16::EditHandlePtr
returnValue(
877 new SFUInt16::EditHandle(
879 this->getType().getFieldDesc(HorFieldId
),
883 editSField(HorFieldMask
);
888 GetFieldHandlePtr
TextureBackgroundBase::getHandleVert (void) const
890 SFUInt16::GetHandlePtr
returnValue(
891 new SFUInt16::GetHandle(
893 this->getType().getFieldDesc(VertFieldId
),
894 const_cast<TextureBackgroundBase
*>(this)));
899 EditFieldHandlePtr
TextureBackgroundBase::editHandleVert (void)
901 SFUInt16::EditHandlePtr
returnValue(
902 new SFUInt16::EditHandle(
904 this->getType().getFieldDesc(VertFieldId
),
908 editSField(VertFieldMask
);
914 #ifdef OSG_MT_CPTR_ASPECT
915 void TextureBackgroundBase::execSyncV( FieldContainer
&oFrom
,
916 ConstFieldMaskArg whichField
,
917 AspectOffsetStore
&oOffsets
,
918 ConstFieldMaskArg syncMode
,
919 const UInt32 uiSyncInfo
)
921 TextureBackground
*pThis
= static_cast<TextureBackground
*>(this);
923 pThis
->execSync(static_cast<TextureBackground
*>(&oFrom
),
932 #ifdef OSG_MT_CPTR_ASPECT
933 FieldContainer
*TextureBackgroundBase::createAspectCopy(
934 const FieldContainer
*pRefAspect
) const
936 TextureBackground
*returnValue
;
938 newAspectCopy(returnValue
,
939 dynamic_cast<const TextureBackground
*>(pRefAspect
),
940 dynamic_cast<const TextureBackground
*>(this));
946 void TextureBackgroundBase::resolveLinks(void)
948 Inherited::resolveLinks();
950 static_cast<TextureBackground
*>(this)->setTexture(NULL
);
952 #ifdef OSG_MT_CPTR_ASPECT
953 AspectOffsetStore oOffsets
;
955 _pAspectStore
->fillOffsetArray(oOffsets
, this);
958 #ifdef OSG_MT_CPTR_ASPECT
959 _mfTexCoords
.terminateShare(Thread::getCurrentAspect(),