Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::SimpleTexturedMaterialBase Class Reference

SimpleTexturedMaterial Base Class.

#include <OSGSimpleTexturedMaterialBase.h>

Inheritance diagram for osg::SimpleTexturedMaterialBase:

osg::SimpleMaterial osg::SimpleMaterialBase osg::ChunkMaterial osg::ChunkMaterialBase osg::Material osg::MaterialBase osg::AttachmentContainer osg::FieldContainer osg::SimpleTexturedMaterial List of all members.

Rendering

StatePtr getState (void)
*typedef TypedFunctor1Base<
Action::ResultE, PtrCallArg<
DrawActionBase > > 
DrawFunctor

Public Types

typedef SimpleTexturedMaterialPtr Ptr
enum  {
  ImageFieldId = Inherited::NextFieldId, MinFilterFieldId = ImageFieldId + 1, MagFilterFieldId = MinFilterFieldId + 1, EnvModeFieldId = MagFilterFieldId + 1,
  EnvMapFieldId = EnvModeFieldId + 1, NextFieldId = EnvMapFieldId + 1
}

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFImagePtrgetSFImage (void)
 Get the SimpleTexturedMaterial::_sfImage field.
SFGLenumgetSFMinFilter (void)
 Get the SimpleTexturedMaterial::_sfMinFilter field.
SFGLenumgetSFMagFilter (void)
 Get the SimpleTexturedMaterial::_sfMagFilter field.
SFGLenumgetSFEnvMode (void)
 Get the SimpleTexturedMaterial::_sfEnvMode field.
SFBoolgetSFEnvMap (void)
 Get the SimpleTexturedMaterial::_sfEnvMap field.
ImagePtrgetImage (void)
 Get the value of the SimpleTexturedMaterial::_sfImage field.
const ImagePtrgetImage (void) const
 Get the value of the SimpleTexturedMaterial::_sfImage field.
GLenumgetMinFilter (void)
 Get the value of the SimpleTexturedMaterial::_sfMinFilter field.
const GLenumgetMinFilter (void) const
 Get the value of the SimpleTexturedMaterial::_sfMinFilter field.
GLenumgetMagFilter (void)
 Get the value of the SimpleTexturedMaterial::_sfMagFilter field.
const GLenumgetMagFilter (void) const
 Get the value of the SimpleTexturedMaterial::_sfMagFilter field.
GLenumgetEnvMode (void)
 Get the value of the SimpleTexturedMaterial::_sfEnvMode field.
const GLenumgetEnvMode (void) const
 Get the value of the SimpleTexturedMaterial::_sfEnvMode field.
bool & getEnvMap (void)
 Get the value of the SimpleTexturedMaterial::_sfEnvMap field.
const bool & getEnvMap (void) const
 Get the value of the SimpleTexturedMaterial::_sfEnvMap field.
Field Set
*void setImage (const ImagePtr &value)
 Set the value of the SimpleTexturedMaterial::_sfImage field.
void setMinFilter (const GLenum &value)
 Set the value of the SimpleTexturedMaterial::_sfMinFilter field.
void setMagFilter (const GLenum &value)
 Set the value of the SimpleTexturedMaterial::_sfMagFilter field.
void setEnvMode (const GLenum &value)
 Set the value of the SimpleTexturedMaterial::_sfEnvMode field.
void setEnvMap (const bool &value)
 Set the value of the SimpleTexturedMaterial::_sfEnvMap field.
Binary Access
*virtual UInt32 getBinSize (const BitVector &whichField)
virtual void copyToBin (BinaryDataHandler &pMem, const BitVector &whichField)
virtual void copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField)
Copy
*virtual FieldContainerPtr shallowCopy (void) const
Sync
*virtual void changed (BitVector whichField, UInt32 origin)
Output
*virtual void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const
Rendering
*virtual StatePtr makeState (void)
virtual void rebuildState (void)
virtual bool isTransparent (void) const
Field Get
*SFColor3fgetSFAmbient (void)
 Get the SimpleMaterial::_sfAmbient field.
SFColor3fgetSFDiffuse (void)
 Get the SimpleMaterial::_sfDiffuse field.
SFColor3fgetSFSpecular (void)
 Get the SimpleMaterial::_sfSpecular field.
SFReal32getSFShininess (void)
 Get the SimpleMaterial::_sfShininess field.
SFColor3fgetSFEmission (void)
 Get the SimpleMaterial::_sfEmission field.
SFReal32getSFTransparency (void)
 Get the SimpleMaterial::_sfTransparency field.
SFBoolgetSFLit (void)
 Get the SimpleMaterial::_sfLit field.
SFGLenumgetSFColorMaterial (void)
 Get the SimpleMaterial::_sfColorMaterial field.
Color3fgetAmbient (void)
 Get the value of the SimpleMaterial::_sfAmbient field.
const Color3fgetAmbient (void) const
 Get the value of the SimpleMaterial::_sfAmbient field.
Color3fgetDiffuse (void)
 Get the value of the SimpleMaterial::_sfDiffuse field.
const Color3fgetDiffuse (void) const
 Get the value of the SimpleMaterial::_sfDiffuse field.
Color3fgetSpecular (void)
 Get the value of the SimpleMaterial::_sfSpecular field.
const Color3fgetSpecular (void) const
 Get the value of the SimpleMaterial::_sfSpecular field.
Real32getShininess (void)
 Get the value of the SimpleMaterial::_sfShininess field.
const Real32getShininess (void) const
 Get the value of the SimpleMaterial::_sfShininess field.
Color3fgetEmission (void)
 Get the value of the SimpleMaterial::_sfEmission field.
const Color3fgetEmission (void) const
 Get the value of the SimpleMaterial::_sfEmission field.
Real32getTransparency (void)
 Get the value of the SimpleMaterial::_sfTransparency field.
const Real32getTransparency (void) const
 Get the value of the SimpleMaterial::_sfTransparency field.
bool & getLit (void)
 Get the value of the SimpleMaterial::_sfLit field.
const bool & getLit (void) const
 Get the value of the SimpleMaterial::_sfLit field.
GLenumgetColorMaterial (void)
 Get the value of the SimpleMaterial::_sfColorMaterial field.
const GLenumgetColorMaterial (void) const
 Get the value of the SimpleMaterial::_sfColorMaterial field.
Field Set
*void setAmbient (const Color3f &value)
 Set the value of the SimpleMaterial::_sfAmbient field.
void setDiffuse (const Color3f &value)
 Set the value of the SimpleMaterial::_sfDiffuse field.
void setSpecular (const Color3f &value)
 Set the value of the SimpleMaterial::_sfSpecular field.
void setShininess (const Real32 &value)
 Set the value of the SimpleMaterial::_sfShininess field.
void setEmission (const Color3f &value)
 Set the value of the SimpleMaterial::_sfEmission field.
void setTransparency (const Real32 &value)
 Set the value of the SimpleMaterial::_sfTransparency field.
void setLit (const bool &value)
 Set the value of the SimpleMaterial::_sfLit field.
void setColorMaterial (const GLenum &value)
 Set the value of the SimpleMaterial::_sfColorMaterial field.
Rendering
*virtual void draw (DrawFunctor &func, DrawActionBase *action)
virtual void draw (Geometry *geo, DrawActionBase *action)
Access
*bool addChunk (StateChunkPtr chunk, Int32 slot=State::AutoSlotReplace)
bool subChunk (StateChunkPtr chunk, Int32 slot=State::AutoSlotReplace)
Int32 find (StateChunkPtr chunk)
StateChunkPtr find (const FieldContainerType &type, Int32 slot=State::AutoSlotReplace)
virtual bool operator== (const Material &other)
Comparison
virtual bool operator== (const Material &other) const
*virtual bool operator< (const Material &other) const
virtual bool operator!= (const Material &other) const
Field Get
*MFStateChunkPtrgetMFChunks (void)
 Get the ChunkMaterial::_mfChunks field.
MFInt32getMFSlots (void)
 Get the ChunkMaterial::_mfSlots field.
StateChunkPtrgetChunks (const UInt32 index)
 Get the value of the index element the ChunkMaterial::_mfChunks field.
MFStateChunkPtrgetChunks (void)
 Get the ChunkMaterial::_mfChunks field.
const MFStateChunkPtrgetChunks (void) const
 Get the ChunkMaterial::_mfChunks field.
Int32getSlots (const UInt32 index)
 Get the value of the index element the ChunkMaterial::_mfSlots field.
MFInt32getSlots (void)
 Get the ChunkMaterial::_mfSlots field.
const MFInt32getSlots (void) const
 Get the ChunkMaterial::_mfSlots field.
Field Get
*SFInt32getSFSortKey (void)
 Get the Material::_sfSortKey field.
Int32getSortKey (void)
 Get the value of the Material::_sfSortKey field.
const Int32getSortKey (void) const
 Get the value of the Material::_sfSortKey field.
Field Set
*void setSortKey (const Int32 &value)
 Set the value of the Material::_sfSortKey field.

Static Public Member Functions

Class Get
*static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction
*static SimpleTexturedMaterialPtr create (void)
 create a new instance of the class
static SimpleTexturedMaterialPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype
Class Get
*static const char * getClassname (void)

Static Public Attributes

static const osg::BitVector ImageFieldMask
static const osg::BitVector MinFilterFieldMask
static const osg::BitVector MagFilterFieldMask
static const osg::BitVector EnvModeFieldMask
static const osg::BitVector EnvMapFieldMask
static const osg::BitVector MTInfluenceMask
static const osg::BitVector AmbientFieldMask
static const osg::BitVector DiffuseFieldMask
static const osg::BitVector SpecularFieldMask
static const osg::BitVector ShininessFieldMask
static const osg::BitVector EmissionFieldMask
static const osg::BitVector TransparencyFieldMask
static const osg::BitVector LitFieldMask
static const osg::BitVector ColorMaterialFieldMask
static const osg::BitVector ChunksFieldMask
static const osg::BitVector SlotsFieldMask
static const osg::BitVector SortKeyFieldMask
static const BitVector AttachmentsFieldMask
static const BitVector NextFieldMask
Constants
*static const Int32 NoStateSorting = 0x7fffffff

Protected Member Functions

MT Destruction
*virtual void onDestroy (void)
MT Destruction
*virtual void onDestroy (void)
Constructors
SimpleTexturedMaterialBase (void)
 SimpleTexturedMaterialBase (const SimpleTexturedMaterialBase &source)
Destructors
*virtual ~SimpleTexturedMaterialBase (void)
Sync
*void executeSyncImpl (SimpleTexturedMaterialBase *pOther, const BitVector &whichField)
virtual void executeSync (FieldContainer &other, const BitVector &whichField)
Helper
*void prepareLocalChunks (void)
Sync
*void executeSyncImpl (SimpleMaterialBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (ChunkMaterialBase *pOther, const BitVector &whichField)
Sync
*void executeSyncImpl (MaterialBase *pOther, const BitVector &whichField)
MT Destruction
*virtual void onDestroy (void)

Protected Attributes

StatePtr _pState
Fields
*SFImagePtr _sfImage
SFGLenum _sfMinFilter
SFGLenum _sfMagFilter
SFGLenum _sfEnvMode
SFBool _sfEnvMap
Fields
*SFColor3f _sfAmbient
SFColor3f _sfDiffuse
SFColor3f _sfSpecular
SFReal32 _sfShininess
SFColor3f _sfEmission
SFReal32 _sfTransparency
SFBool _sfLit
SFGLenum _sfColorMaterial
Fields
*MFStateChunkPtr _mfChunks
MFInt32 _mfSlots
Fields
*SFInt32 _sfSortKey

Private Types

typedef SimpleMaterial Inherited

Private Member Functions

void operator= (const SimpleTexturedMaterialBase &source)

Static Private Attributes

static FieldDescription_desc []
 SimpleTexturedMaterial description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 85 of file OSGSimpleTexturedMaterialBase.h.


Member Typedef Documentation

typedef SimpleMaterial osg::SimpleTexturedMaterialBase::Inherited [private]
 

Reimplemented from osg::SimpleMaterial.

Reimplemented in osg::SimpleTexturedMaterial.

Definition at line 89 of file OSGSimpleTexturedMaterialBase.h.

typedef SimpleTexturedMaterialPtr osg::SimpleTexturedMaterialBase::Ptr
 

Reimplemented from osg::SimpleMaterialBase.

Definition at line 94 of file OSGSimpleTexturedMaterialBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
ImageFieldId 
MinFilterFieldId 
MagFilterFieldId 
EnvModeFieldId 
EnvMapFieldId 
NextFieldId 

Reimplemented from osg::SimpleMaterialBase.

Definition at line 96 of file OSGSimpleTexturedMaterialBase.h.

00097     {
00098         ImageFieldId     = Inherited::NextFieldId,
00099         MinFilterFieldId = ImageFieldId     + 1,
00100         MagFilterFieldId = MinFilterFieldId + 1,
00101         EnvModeFieldId   = MagFilterFieldId + 1,
00102         EnvMapFieldId    = EnvModeFieldId   + 1,
00103         NextFieldId      = EnvMapFieldId    + 1
00104     };


Constructor & Destructor Documentation

SimpleTexturedMaterialBase::SimpleTexturedMaterialBase void   )  [protected]
 

Definition at line 211 of file OSGSimpleTexturedMaterialBase.cpp.

00211                                                            :
00212     _sfImage                  (), 
00213     _sfMinFilter              (GLenum(GL_LINEAR_MIPMAP_LINEAR)), 
00214     _sfMagFilter              (GLenum(GL_LINEAR)), 
00215     _sfEnvMode                (GLenum(GL_REPLACE)), 
00216     _sfEnvMap                 (bool(false)), 
00217     Inherited() 
00218 {
00219 }

SimpleTexturedMaterialBase::SimpleTexturedMaterialBase const SimpleTexturedMaterialBase source  )  [protected]
 

Definition at line 225 of file OSGSimpleTexturedMaterialBase.cpp.

00225                                                                                                :
00226     _sfImage                  (source._sfImage                  ), 
00227     _sfMinFilter              (source._sfMinFilter              ), 
00228     _sfMagFilter              (source._sfMagFilter              ), 
00229     _sfEnvMode                (source._sfEnvMode                ), 
00230     _sfEnvMap                 (source._sfEnvMap                 ), 
00231     Inherited                 (source)
00232 {
00233 }

SimpleTexturedMaterialBase::~SimpleTexturedMaterialBase void   )  [protected, virtual]
 

Definition at line 237 of file OSGSimpleTexturedMaterialBase.cpp.

00238 {
00239 }


Member Function Documentation

osg::FieldContainerType & osg::SimpleTexturedMaterialBase::getClassType void   )  [inline, static]
 

Reimplemented from osg::SimpleMaterialBase.

Definition at line 58 of file OSGSimpleTexturedMaterialBase.inl.

References _type.

Referenced by create().

00059 {
00060     return _type; 
00061 } 

osg::UInt32 osg::SimpleTexturedMaterialBase::getClassTypeId void   )  [inline, static]
 

Reimplemented from osg::SimpleMaterialBase.

Definition at line 65 of file OSGSimpleTexturedMaterialBase.inl.

References _type, and osg::TypeBase::getId().

00066 {
00067     return _type.getId(); 
00068 } 

FieldContainerType & SimpleTexturedMaterialBase::getType void   )  [virtual]
 

Reimplemented from osg::SimpleMaterialBase.

Definition at line 153 of file OSGSimpleTexturedMaterialBase.cpp.

References _type.

00154 {
00155     return _type; 
00156 } 

const FieldContainerType & SimpleTexturedMaterialBase::getType void   )  const [virtual]
 

Reimplemented from osg::SimpleMaterialBase.

Definition at line 158 of file OSGSimpleTexturedMaterialBase.cpp.

References _type.

00159 {
00160     return _type;
00161 } 

UInt32 SimpleTexturedMaterialBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::SimpleMaterialBase.

Definition at line 173 of file OSGSimpleTexturedMaterialBase.cpp.

00174 { 
00175     return sizeof(SimpleTexturedMaterial); 
00176 }

SFImagePtr * osg::SimpleTexturedMaterialBase::getSFImage void   )  [inline]
 

Definition at line 101 of file OSGSimpleTexturedMaterialBase.inl.

References _sfImage.

00102 {
00103     return &_sfImage;
00104 }

SFGLenum * osg::SimpleTexturedMaterialBase::getSFMinFilter void   )  [inline]
 

Definition at line 108 of file OSGSimpleTexturedMaterialBase.inl.

References _sfMinFilter.

00109 {
00110     return &_sfMinFilter;
00111 }

SFGLenum * osg::SimpleTexturedMaterialBase::getSFMagFilter void   )  [inline]
 

Definition at line 115 of file OSGSimpleTexturedMaterialBase.inl.

References _sfMagFilter.

00116 {
00117     return &_sfMagFilter;
00118 }

SFGLenum * osg::SimpleTexturedMaterialBase::getSFEnvMode void   )  [inline]
 

Definition at line 122 of file OSGSimpleTexturedMaterialBase.inl.

References _sfEnvMode.

00123 {
00124     return &_sfEnvMode;
00125 }

SFBool * osg::SimpleTexturedMaterialBase::getSFEnvMap void   )  [inline]
 

Definition at line 129 of file OSGSimpleTexturedMaterialBase.inl.

References _sfEnvMap.

00130 {
00131     return &_sfEnvMap;
00132 }

ImagePtr & osg::SimpleTexturedMaterialBase::getImage void   )  [inline]
 

Definition at line 137 of file OSGSimpleTexturedMaterialBase.inl.

References _sfImage, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::SimpleTexturedMaterial::changed(), and osg::SimpleTexturedMaterial::isTransparent().

00138 {
00139     return _sfImage.getValue();
00140 }

const ImagePtr & osg::SimpleTexturedMaterialBase::getImage void   )  const [inline]
 

Definition at line 144 of file OSGSimpleTexturedMaterialBase.inl.

References _sfImage, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00145 {
00146     return _sfImage.getValue();
00147 }

GLenum & osg::SimpleTexturedMaterialBase::getMinFilter void   )  [inline]
 

Definition at line 158 of file OSGSimpleTexturedMaterialBase.inl.

References _sfMinFilter, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::SimpleTexturedMaterial::changed().

00159 {
00160     return _sfMinFilter.getValue();
00161 }

const GLenum & osg::SimpleTexturedMaterialBase::getMinFilter void   )  const [inline]
 

Definition at line 165 of file OSGSimpleTexturedMaterialBase.inl.

References _sfMinFilter, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00166 {
00167     return _sfMinFilter.getValue();
00168 }

GLenum & osg::SimpleTexturedMaterialBase::getMagFilter void   )  [inline]
 

Definition at line 179 of file OSGSimpleTexturedMaterialBase.inl.

References _sfMagFilter, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::SimpleTexturedMaterial::changed().

00180 {
00181     return _sfMagFilter.getValue();
00182 }

const GLenum & osg::SimpleTexturedMaterialBase::getMagFilter void   )  const [inline]
 

Definition at line 186 of file OSGSimpleTexturedMaterialBase.inl.

References _sfMagFilter, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00187 {
00188     return _sfMagFilter.getValue();
00189 }

GLenum & osg::SimpleTexturedMaterialBase::getEnvMode void   )  [inline]
 

Definition at line 200 of file OSGSimpleTexturedMaterialBase.inl.

References _sfEnvMode, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::SimpleTexturedMaterial::changed(), and osg::SimpleTexturedMaterial::isTransparent().

00201 {
00202     return _sfEnvMode.getValue();
00203 }

const GLenum & osg::SimpleTexturedMaterialBase::getEnvMode void   )  const [inline]
 

Definition at line 207 of file OSGSimpleTexturedMaterialBase.inl.

References _sfEnvMode, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00208 {
00209     return _sfEnvMode.getValue();
00210 }

bool & osg::SimpleTexturedMaterialBase::getEnvMap void   )  [inline]
 

Definition at line 221 of file OSGSimpleTexturedMaterialBase.inl.

References _sfEnvMap, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

Referenced by osg::SimpleTexturedMaterial::changed().

00222 {
00223     return _sfEnvMap.getValue();
00224 }

const bool & osg::SimpleTexturedMaterialBase::getEnvMap void   )  const [inline]
 

Definition at line 228 of file OSGSimpleTexturedMaterialBase.inl.

References _sfEnvMap, and osg::SField< FieldTypeT, fieldNameSpace >::getValue().

00229 {
00230     return _sfEnvMap.getValue();
00231 }

void osg::SimpleTexturedMaterialBase::setImage const ImagePtr value  )  [inline]
 

Definition at line 151 of file OSGSimpleTexturedMaterialBase.inl.

References _sfImage, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().

00152 {
00153     _sfImage.setValue(value);
00154 }

void osg::SimpleTexturedMaterialBase::setMinFilter const GLenum value