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 SimpleTexturedMaterial!
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"
64 #include "OSGGL.h" // MinFilter default header
65 #include "OSGGL.h" // MagFilter default header
66 #include "OSGGL.h" // EnvMode default header
68 #include "OSGImage.h" // Image Class
70 #include "OSGSimpleTexturedMaterialBase.h"
71 #include "OSGSimpleTexturedMaterial.h"
73 #include <boost/bind.hpp>
77 /***************************************************************************\
79 \***************************************************************************/
81 /*! \class OSG::SimpleTexturedMaterial
82 The simple textured material class. See \ref
83 PageSystemMaterialTexturedSimpleMaterial for a description.
85 A OSG::SimpleMaterial with an added texture. It doesn't expose all features
86 of the texture, just the ones needed most often.
88 OSG::SimpleTexturedMaterial::_sfImage defines the texture,
89 OSG::SimpleTexturedMaterial::_sfMinFilter and
90 OSG::SimpleTexturedMaterial::_sfMagFilter the used filters and
91 OSG::SimpleTexturedMaterial::_sfEnvMode the environment mode. As a special
93 OSG::SimpleTexturedMaterial::_sfEnvMap can be used to use the texture as a
94 spherical environment map.
97 /***************************************************************************\
98 * Field Documentation *
99 \***************************************************************************/
101 /*! \var Image * SimpleTexturedMaterialBase::_sfImage
102 Defines the texture image.
105 /*! \var GLenum SimpleTexturedMaterialBase::_sfMinFilter
106 Defines the minification filter, see glTexParameter for details.
107 Default: GL_LINEAR_MIPMAP_LINEAR.
110 /*! \var GLenum SimpleTexturedMaterialBase::_sfMagFilter
111 Defines the magnification filter, see glTexParameter for details.
115 /*! \var GLenum SimpleTexturedMaterialBase::_sfEnvMode
116 Sets the environment mode, defining how texture and lighting color interact.
120 /*! \var bool SimpleTexturedMaterialBase::_sfEnvMap
121 Defines whether to use the texture as a spherical environment map.
125 /***************************************************************************\
126 * FieldType/FieldTrait Instantiation *
127 \***************************************************************************/
129 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
130 PointerType FieldTraits
<SimpleTexturedMaterial
*, nsOSG
>::_type(
131 "SimpleTexturedMaterialPtr",
133 SimpleTexturedMaterial::getClassType(),
137 OSG_FIELDTRAITS_GETTYPE_NS(SimpleTexturedMaterial
*, nsOSG
)
139 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
140 SimpleTexturedMaterial
*,
143 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
144 SimpleTexturedMaterial
*,
147 /***************************************************************************\
148 * Field Description *
149 \***************************************************************************/
151 void SimpleTexturedMaterialBase::classDescInserter(TypeObject
&oType
)
153 FieldDescriptionBase
*pDesc
= NULL
;
156 pDesc
= new SFUnrecImagePtr::Description(
157 SFUnrecImagePtr::getClassType(),
159 "Defines the texture image.\n",
160 ImageFieldId
, ImageFieldMask
,
162 (Field::SFDefaultFlags
| Field::FStdAccess
),
163 static_cast<FieldEditMethodSig
>(&SimpleTexturedMaterial::editHandleImage
),
164 static_cast<FieldGetMethodSig
>(&SimpleTexturedMaterial::getHandleImage
));
166 oType
.addInitialDesc(pDesc
);
168 pDesc
= new SFGLenum::Description(
169 SFGLenum::getClassType(),
171 "Defines the minification filter, see glTexParameter for details.\n"
172 "Default: GL_LINEAR_MIPMAP_LINEAR.\n",
173 MinFilterFieldId
, MinFilterFieldMask
,
175 (Field::SFDefaultFlags
| Field::FStdAccess
),
176 static_cast<FieldEditMethodSig
>(&SimpleTexturedMaterial::editHandleMinFilter
),
177 static_cast<FieldGetMethodSig
>(&SimpleTexturedMaterial::getHandleMinFilter
));
179 oType
.addInitialDesc(pDesc
);
181 pDesc
= new SFGLenum::Description(
182 SFGLenum::getClassType(),
184 "Defines the magnification filter, see glTexParameter for details.\n"
185 "Default: GL_LINEAR\n",
186 MagFilterFieldId
, MagFilterFieldMask
,
188 (Field::SFDefaultFlags
| Field::FStdAccess
),
189 static_cast<FieldEditMethodSig
>(&SimpleTexturedMaterial::editHandleMagFilter
),
190 static_cast<FieldGetMethodSig
>(&SimpleTexturedMaterial::getHandleMagFilter
));
192 oType
.addInitialDesc(pDesc
);
194 pDesc
= new SFGLenum::Description(
195 SFGLenum::getClassType(),
197 "Sets the environment mode, defining how texture and lighting color interact.\n"
198 "Default: GL_REPLACE.\n",
199 EnvModeFieldId
, EnvModeFieldMask
,
201 (Field::SFDefaultFlags
| Field::FStdAccess
),
202 static_cast<FieldEditMethodSig
>(&SimpleTexturedMaterial::editHandleEnvMode
),
203 static_cast<FieldGetMethodSig
>(&SimpleTexturedMaterial::getHandleEnvMode
));
205 oType
.addInitialDesc(pDesc
);
207 pDesc
= new SFBool::Description(
208 SFBool::getClassType(),
210 "Defines whether to use the texture as a spherical environment map.\n",
211 EnvMapFieldId
, EnvMapFieldMask
,
213 (Field::SFDefaultFlags
| Field::FStdAccess
),
214 static_cast<FieldEditMethodSig
>(&SimpleTexturedMaterial::editHandleEnvMap
),
215 static_cast<FieldGetMethodSig
>(&SimpleTexturedMaterial::getHandleEnvMap
));
217 oType
.addInitialDesc(pDesc
);
221 SimpleTexturedMaterialBase::TypeObject
SimpleTexturedMaterialBase::_type(
222 SimpleTexturedMaterialBase::getClassname(),
223 Inherited::getClassname(),
226 reinterpret_cast<PrototypeCreateF
>(&SimpleTexturedMaterialBase::createEmptyLocal
),
227 reinterpret_cast<InitContainerF
>(&SimpleTexturedMaterial::initMethod
),
228 reinterpret_cast<ExitContainerF
>(&SimpleTexturedMaterial::exitMethod
),
229 reinterpret_cast<InitalInsertDescFunc
>(
230 reinterpret_cast<void *>(&SimpleTexturedMaterial::classDescInserter
)),
233 "<?xml version=\"1.0\"?>\n"
236 " name=\"SimpleTexturedMaterial\"\n"
237 " parent=\"SimpleMaterial\"\n"
238 " library=\"Drawable\"\n"
239 " pointerfieldtypes=\"both\"\n"
240 " structure=\"concrete\"\n"
241 " systemcomponent=\"true\"\n"
242 " parentsystemcomponent=\"true\"\n"
243 " decoratable=\"false\"\n"
244 " docGroupBase=\"GrpDrawablesMaterial\"\n"
246 " The simple textured material class. See \\ref\n"
247 " PageSystemMaterialTexturedSimpleMaterial for a description.\n"
249 " A OSG::SimpleMaterial with an added texture. It doesn't expose all features \n"
250 " of the texture, just the ones needed most often.\n"
252 " OSG::SimpleTexturedMaterial::_sfImage defines the texture, \n"
253 " OSG::SimpleTexturedMaterial::_sfMinFilter and\n"
254 " OSG::SimpleTexturedMaterial::_sfMagFilter the used filters and \n"
255 " OSG::SimpleTexturedMaterial::_sfEnvMode the environment mode. As a special \n"
257 " OSG::SimpleTexturedMaterial::_sfEnvMap can be used to use the texture as a\n"
258 " spherical environment map.\n"
260 "\t name=\"image\"\n"
261 "\t type=\"ImagePtr\"\n"
262 "\t cardinality=\"single\"\n"
263 "\t visibility=\"external\"\n"
264 "\t access=\"public\"\n"
266 "\tDefines the texture image.\n"
269 "\t name=\"minFilter\"\n"
270 "\t type=\"GLenum\"\n"
271 "\t cardinality=\"single\"\n"
272 "\t visibility=\"external\"\n"
273 "\t defaultValue=\"GL_LINEAR_MIPMAP_LINEAR\"\n"
274 "\t defaultHeader=\""OSGGL.h"\"\n"
275 "\t access=\"public\"\n"
276 " potential_values=\"GL_NEAREST, GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_LINEAR\"\n"
278 "\tDefines the minification filter, see glTexParameter for details.\n"
279 " Default: GL_LINEAR_MIPMAP_LINEAR.\n"
282 "\t name=\"magFilter\"\n"
283 "\t type=\"GLenum\"\n"
284 "\t cardinality=\"single\"\n"
285 "\t visibility=\"external\"\n"
286 "\t defaultValue=\"GL_LINEAR\"\n"
287 "\t defaultHeader=\""OSGGL.h"\"\n"
288 "\t access=\"public\"\n"
289 " potential_values=\"GL_NEAREST, GL_LINEAR\"\n"
291 "\tDefines the magnification filter, see glTexParameter for details.\n"
292 " Default: GL_LINEAR\n"
295 "\t name=\"envMode\"\n"
296 "\t type=\"GLenum\"\n"
297 "\t cardinality=\"single\"\n"
298 "\t visibility=\"external\"\n"
299 "\t defaultValue=\"GL_REPLACE\"\n"
300 "\t defaultHeader=\""OSGGL.h"\"\n"
301 "\t access=\"public\"\n"
302 " potential_values=\"GL_MODULATE, GL_DECAL, GL_BLEND, GL_REPLACE, GL_ADD, GL_COMBINE\"\n"
304 "\tSets the environment mode, defining how texture and lighting color interact.\n"
305 " Default: GL_REPLACE.\n"
308 "\t name=\"envMap\"\n"
310 "\t cardinality=\"single\"\n"
311 "\t visibility=\"external\"\n"
312 "\t defaultValue=\"false\"\n"
313 "\t access=\"public\"\n"
315 "\tDefines whether to use the texture as a spherical environment map.\n"
317 "</FieldContainer>\n",
318 "The simple textured material class. See \\ref\n"
319 "PageSystemMaterialTexturedSimpleMaterial for a description.\n"
321 "A OSG::SimpleMaterial with an added texture. It doesn't expose all features \n"
322 "of the texture, just the ones needed most often.\n"
324 "OSG::SimpleTexturedMaterial::_sfImage defines the texture, \n"
325 "OSG::SimpleTexturedMaterial::_sfMinFilter and\n"
326 "OSG::SimpleTexturedMaterial::_sfMagFilter the used filters and \n"
327 "OSG::SimpleTexturedMaterial::_sfEnvMode the environment mode. As a special \n"
329 "OSG::SimpleTexturedMaterial::_sfEnvMap can be used to use the texture as a\n"
330 "spherical environment map.\n"
333 /*------------------------------ get -----------------------------------*/
335 FieldContainerType
&SimpleTexturedMaterialBase::getType(void)
340 const FieldContainerType
&SimpleTexturedMaterialBase::getType(void) const
345 UInt32
SimpleTexturedMaterialBase::getContainerSize(void) const
347 return sizeof(SimpleTexturedMaterial
);
350 /*------------------------- decorator get ------------------------------*/
353 //! Get the SimpleTexturedMaterial::_sfImage field.
354 const SFUnrecImagePtr
*SimpleTexturedMaterialBase::getSFImage(void) const
359 SFUnrecImagePtr
*SimpleTexturedMaterialBase::editSFImage (void)
361 editSField(ImageFieldMask
);
366 //! Get the value of the SimpleTexturedMaterial::_sfImage field.
367 Image
* SimpleTexturedMaterialBase::getImage(void) const
369 return _sfImage
.getValue();
372 //! Set the value of the SimpleTexturedMaterial::_sfImage field.
373 void SimpleTexturedMaterialBase::setImage(Image
* const value
)
375 editSField(ImageFieldMask
);
377 _sfImage
.setValue(value
);
381 SFGLenum
*SimpleTexturedMaterialBase::editSFMinFilter(void)
383 editSField(MinFilterFieldMask
);
385 return &_sfMinFilter
;
388 const SFGLenum
*SimpleTexturedMaterialBase::getSFMinFilter(void) const
390 return &_sfMinFilter
;
394 SFGLenum
*SimpleTexturedMaterialBase::editSFMagFilter(void)
396 editSField(MagFilterFieldMask
);
398 return &_sfMagFilter
;
401 const SFGLenum
*SimpleTexturedMaterialBase::getSFMagFilter(void) const
403 return &_sfMagFilter
;
407 SFGLenum
*SimpleTexturedMaterialBase::editSFEnvMode(void)
409 editSField(EnvModeFieldMask
);
414 const SFGLenum
*SimpleTexturedMaterialBase::getSFEnvMode(void) const
420 SFBool
*SimpleTexturedMaterialBase::editSFEnvMap(void)
422 editSField(EnvMapFieldMask
);
427 const SFBool
*SimpleTexturedMaterialBase::getSFEnvMap(void) const
437 /*------------------------------ access -----------------------------------*/
439 SizeT
SimpleTexturedMaterialBase::getBinSize(ConstFieldMaskArg whichField
)
441 SizeT returnValue
= Inherited::getBinSize(whichField
);
443 if(FieldBits::NoField
!= (ImageFieldMask
& whichField
))
445 returnValue
+= _sfImage
.getBinSize();
447 if(FieldBits::NoField
!= (MinFilterFieldMask
& whichField
))
449 returnValue
+= _sfMinFilter
.getBinSize();
451 if(FieldBits::NoField
!= (MagFilterFieldMask
& whichField
))
453 returnValue
+= _sfMagFilter
.getBinSize();
455 if(FieldBits::NoField
!= (EnvModeFieldMask
& whichField
))
457 returnValue
+= _sfEnvMode
.getBinSize();
459 if(FieldBits::NoField
!= (EnvMapFieldMask
& whichField
))
461 returnValue
+= _sfEnvMap
.getBinSize();
467 void SimpleTexturedMaterialBase::copyToBin(BinaryDataHandler
&pMem
,
468 ConstFieldMaskArg whichField
)
470 Inherited::copyToBin(pMem
, whichField
);
472 if(FieldBits::NoField
!= (ImageFieldMask
& whichField
))
474 _sfImage
.copyToBin(pMem
);
476 if(FieldBits::NoField
!= (MinFilterFieldMask
& whichField
))
478 _sfMinFilter
.copyToBin(pMem
);
480 if(FieldBits::NoField
!= (MagFilterFieldMask
& whichField
))
482 _sfMagFilter
.copyToBin(pMem
);
484 if(FieldBits::NoField
!= (EnvModeFieldMask
& whichField
))
486 _sfEnvMode
.copyToBin(pMem
);
488 if(FieldBits::NoField
!= (EnvMapFieldMask
& whichField
))
490 _sfEnvMap
.copyToBin(pMem
);
494 void SimpleTexturedMaterialBase::copyFromBin(BinaryDataHandler
&pMem
,
495 ConstFieldMaskArg whichField
)
497 Inherited::copyFromBin(pMem
, whichField
);
499 if(FieldBits::NoField
!= (ImageFieldMask
& whichField
))
501 editSField(ImageFieldMask
);
502 _sfImage
.copyFromBin(pMem
);
504 if(FieldBits::NoField
!= (MinFilterFieldMask
& whichField
))
506 editSField(MinFilterFieldMask
);
507 _sfMinFilter
.copyFromBin(pMem
);
509 if(FieldBits::NoField
!= (MagFilterFieldMask
& whichField
))
511 editSField(MagFilterFieldMask
);
512 _sfMagFilter
.copyFromBin(pMem
);
514 if(FieldBits::NoField
!= (EnvModeFieldMask
& whichField
))
516 editSField(EnvModeFieldMask
);
517 _sfEnvMode
.copyFromBin(pMem
);
519 if(FieldBits::NoField
!= (EnvMapFieldMask
& whichField
))
521 editSField(EnvMapFieldMask
);
522 _sfEnvMap
.copyFromBin(pMem
);
526 //! create a new instance of the class
527 SimpleTexturedMaterialTransitPtr
SimpleTexturedMaterialBase::createLocal(BitVector bFlags
)
529 SimpleTexturedMaterialTransitPtr fc
;
531 if(getClassType().getPrototype() != NULL
)
533 FieldContainerTransitPtr tmpPtr
=
534 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
536 fc
= dynamic_pointer_cast
<SimpleTexturedMaterial
>(tmpPtr
);
542 //! create a new instance of the class, copy the container flags
543 SimpleTexturedMaterialTransitPtr
SimpleTexturedMaterialBase::createDependent(BitVector bFlags
)
545 SimpleTexturedMaterialTransitPtr fc
;
547 if(getClassType().getPrototype() != NULL
)
549 FieldContainerTransitPtr tmpPtr
=
550 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
552 fc
= dynamic_pointer_cast
<SimpleTexturedMaterial
>(tmpPtr
);
558 //! create a new instance of the class
559 SimpleTexturedMaterialTransitPtr
SimpleTexturedMaterialBase::create(void)
561 SimpleTexturedMaterialTransitPtr fc
;
563 if(getClassType().getPrototype() != NULL
)
565 FieldContainerTransitPtr tmpPtr
=
566 getClassType().getPrototype()-> shallowCopy();
568 fc
= dynamic_pointer_cast
<SimpleTexturedMaterial
>(tmpPtr
);
574 SimpleTexturedMaterial
*SimpleTexturedMaterialBase::createEmptyLocal(BitVector bFlags
)
576 SimpleTexturedMaterial
*returnValue
;
578 newPtr
<SimpleTexturedMaterial
>(returnValue
, bFlags
);
580 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
585 //! create an empty new instance of the class, do not copy the prototype
586 SimpleTexturedMaterial
*SimpleTexturedMaterialBase::createEmpty(void)
588 SimpleTexturedMaterial
*returnValue
;
590 newPtr
<SimpleTexturedMaterial
>(returnValue
, Thread::getCurrentLocalFlags());
592 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
593 ~Thread::getCurrentLocalFlags();
599 FieldContainerTransitPtr
SimpleTexturedMaterialBase::shallowCopyLocal(
600 BitVector bFlags
) const
602 SimpleTexturedMaterial
*tmpPtr
;
604 newPtr(tmpPtr
, dynamic_cast<const SimpleTexturedMaterial
*>(this), bFlags
);
606 FieldContainerTransitPtr
returnValue(tmpPtr
);
608 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
613 FieldContainerTransitPtr
SimpleTexturedMaterialBase::shallowCopyDependent(
614 BitVector bFlags
) const
616 SimpleTexturedMaterial
*tmpPtr
;
618 newPtr(tmpPtr
, dynamic_cast<const SimpleTexturedMaterial
*>(this), ~bFlags
);
620 FieldContainerTransitPtr
returnValue(tmpPtr
);
622 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
627 FieldContainerTransitPtr
SimpleTexturedMaterialBase::shallowCopy(void) const
629 SimpleTexturedMaterial
*tmpPtr
;
632 dynamic_cast<const SimpleTexturedMaterial
*>(this),
633 Thread::getCurrentLocalFlags());
635 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
637 FieldContainerTransitPtr
returnValue(tmpPtr
);
645 /*------------------------- constructors ----------------------------------*/
647 SimpleTexturedMaterialBase::SimpleTexturedMaterialBase(void) :
650 _sfMinFilter (GLenum(GL_LINEAR_MIPMAP_LINEAR
)),
651 _sfMagFilter (GLenum(GL_LINEAR
)),
652 _sfEnvMode (GLenum(GL_REPLACE
)),
653 _sfEnvMap (bool(false))
657 SimpleTexturedMaterialBase::SimpleTexturedMaterialBase(const SimpleTexturedMaterialBase
&source
) :
660 _sfMinFilter (source
._sfMinFilter
),
661 _sfMagFilter (source
._sfMagFilter
),
662 _sfEnvMode (source
._sfEnvMode
),
663 _sfEnvMap (source
._sfEnvMap
)
668 /*-------------------------- destructors ----------------------------------*/
670 SimpleTexturedMaterialBase::~SimpleTexturedMaterialBase(void)
674 void SimpleTexturedMaterialBase::onCreate(const SimpleTexturedMaterial
*source
)
676 Inherited::onCreate(source
);
680 SimpleTexturedMaterial
*pThis
= static_cast<SimpleTexturedMaterial
*>(this);
682 pThis
->setImage(source
->getImage());
686 GetFieldHandlePtr
SimpleTexturedMaterialBase::getHandleImage (void) const
688 SFUnrecImagePtr::GetHandlePtr
returnValue(
689 new SFUnrecImagePtr::GetHandle(
691 this->getType().getFieldDesc(ImageFieldId
),
692 const_cast<SimpleTexturedMaterialBase
*>(this)));
697 EditFieldHandlePtr
SimpleTexturedMaterialBase::editHandleImage (void)
699 SFUnrecImagePtr::EditHandlePtr
returnValue(
700 new SFUnrecImagePtr::EditHandle(
702 this->getType().getFieldDesc(ImageFieldId
),
705 returnValue
->setSetMethod(
706 boost::bind(&SimpleTexturedMaterial::setImage
,
707 static_cast<SimpleTexturedMaterial
*>(this), _1
));
709 editSField(ImageFieldMask
);
714 GetFieldHandlePtr
SimpleTexturedMaterialBase::getHandleMinFilter (void) const
716 SFGLenum::GetHandlePtr
returnValue(
717 new SFGLenum::GetHandle(
719 this->getType().getFieldDesc(MinFilterFieldId
),
720 const_cast<SimpleTexturedMaterialBase
*>(this)));
725 EditFieldHandlePtr
SimpleTexturedMaterialBase::editHandleMinFilter (void)
727 SFGLenum::EditHandlePtr
returnValue(
728 new SFGLenum::EditHandle(
730 this->getType().getFieldDesc(MinFilterFieldId
),
734 editSField(MinFilterFieldMask
);
739 GetFieldHandlePtr
SimpleTexturedMaterialBase::getHandleMagFilter (void) const
741 SFGLenum::GetHandlePtr
returnValue(
742 new SFGLenum::GetHandle(
744 this->getType().getFieldDesc(MagFilterFieldId
),
745 const_cast<SimpleTexturedMaterialBase
*>(this)));
750 EditFieldHandlePtr
SimpleTexturedMaterialBase::editHandleMagFilter (void)
752 SFGLenum::EditHandlePtr
returnValue(
753 new SFGLenum::EditHandle(
755 this->getType().getFieldDesc(MagFilterFieldId
),
759 editSField(MagFilterFieldMask
);
764 GetFieldHandlePtr
SimpleTexturedMaterialBase::getHandleEnvMode (void) const
766 SFGLenum::GetHandlePtr
returnValue(
767 new SFGLenum::GetHandle(
769 this->getType().getFieldDesc(EnvModeFieldId
),
770 const_cast<SimpleTexturedMaterialBase
*>(this)));
775 EditFieldHandlePtr
SimpleTexturedMaterialBase::editHandleEnvMode (void)
777 SFGLenum::EditHandlePtr
returnValue(
778 new SFGLenum::EditHandle(
780 this->getType().getFieldDesc(EnvModeFieldId
),
784 editSField(EnvModeFieldMask
);
789 GetFieldHandlePtr
SimpleTexturedMaterialBase::getHandleEnvMap (void) const
791 SFBool::GetHandlePtr
returnValue(
792 new SFBool::GetHandle(
794 this->getType().getFieldDesc(EnvMapFieldId
),
795 const_cast<SimpleTexturedMaterialBase
*>(this)));
800 EditFieldHandlePtr
SimpleTexturedMaterialBase::editHandleEnvMap (void)
802 SFBool::EditHandlePtr
returnValue(
803 new SFBool::EditHandle(
805 this->getType().getFieldDesc(EnvMapFieldId
),
809 editSField(EnvMapFieldMask
);
815 #ifdef OSG_MT_CPTR_ASPECT
816 void SimpleTexturedMaterialBase::execSyncV( FieldContainer
&oFrom
,
817 ConstFieldMaskArg whichField
,
818 AspectOffsetStore
&oOffsets
,
819 ConstFieldMaskArg syncMode
,
820 const UInt32 uiSyncInfo
)
822 SimpleTexturedMaterial
*pThis
= static_cast<SimpleTexturedMaterial
*>(this);
824 pThis
->execSync(static_cast<SimpleTexturedMaterial
*>(&oFrom
),
833 #ifdef OSG_MT_CPTR_ASPECT
834 FieldContainer
*SimpleTexturedMaterialBase::createAspectCopy(
835 const FieldContainer
*pRefAspect
) const
837 SimpleTexturedMaterial
*returnValue
;
839 newAspectCopy(returnValue
,
840 dynamic_cast<const SimpleTexturedMaterial
*>(pRefAspect
),
841 dynamic_cast<const SimpleTexturedMaterial
*>(this));
847 void SimpleTexturedMaterialBase::resolveLinks(void)
849 Inherited::resolveLinks();
851 static_cast<SimpleTexturedMaterial
*>(this)->setImage(NULL
);