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

osg::SimpleMaterial Class Reference
[Materials]

Simple Material wrapping standard OpenGL lighting. See SimpleMaterial for a description. More...

#include <OSGSimpleMaterial.h>

Inheritance diagram for osg::SimpleMaterial:

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

Rendering

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

Public Types

typedef SimpleMaterialPtr Ptr
enum  {
  AmbientFieldId = Inherited::NextFieldId, DiffuseFieldId = AmbientFieldId + 1, SpecularFieldId = DiffuseFieldId + 1, ShininessFieldId = SpecularFieldId + 1,
  EmissionFieldId = ShininessFieldId + 1, TransparencyFieldId = EmissionFieldId + 1, LitFieldId = TransparencyFieldId + 1, ColorMaterialFieldId = LitFieldId + 1,
  NextFieldId = ColorMaterialFieldId + 1
}

Public Member Functions

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
FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (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.
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
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 const char * getClassname (void)
Class Get
*static FieldContainerTypegetClassType (void)
 access the type of the class
static UInt32 getClassTypeId (void)
 access the numerical type of the class
Construction
*static SimpleMaterialPtr create (void)
 create a new instance of the class
static SimpleMaterialPtr createEmpty (void)
 create an empty new instance of the class, do not copy the prototype

Static Public Attributes

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 MTInfluenceMask
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

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

Protected Attributes

StatePtr _pState
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 SimpleMaterialBase Inherited

Private Member Functions

void operator= (const SimpleMaterial &source)

Static Private Member Functions

static void initMethod (void)

Private Attributes

MaterialChunkPtr _materialChunk
BlendChunkPtr _blendChunk

Friends

class FieldContainer
class SimpleMaterialBase

Detailed Description

The simple material class. See SimpleMaterial for a description.

This material wraps the standard calls to glMaterial() in osg::SimpleMaterial::_sfAmbient, osg::SimpleMaterial::_sfDiffuse, osg::SimpleMaterial::_sfEmission, osg::SimpleMaterial::_sfSpecular, osg::SimpleMaterial::_sfShininess. In addition it supports transparency (osg::SimpleMaterial::_sfTransparency), can switch lighting (osg::SimpleMaterial::_sfLit) and the color material (osg::SimpleMaterial::_sfColorMaterial).

Definition at line 57 of file OSGSimpleMaterial.h.


Member Typedef Documentation

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

Reimplemented from osg::SimpleMaterialBase.

Reimplemented in osg::SimpleTexturedMaterial, and osg::SimpleTexturedMaterialBase.

Definition at line 126 of file OSGSimpleMaterial.h.

typedef SimpleMaterialPtr osg::SimpleMaterialBase::Ptr [inherited]
 

Reimplemented from osg::ChunkMaterialBase.

Reimplemented in osg::SimpleTexturedMaterialBase.

Definition at line 97 of file OSGSimpleMaterialBase.h.


Member Enumeration Documentation

anonymous enum [inherited]
 

Enumerator:
AmbientFieldId 
DiffuseFieldId 
SpecularFieldId 
ShininessFieldId 
EmissionFieldId 
TransparencyFieldId 
LitFieldId 
ColorMaterialFieldId 
NextFieldId 

Reimplemented from osg::ChunkMaterialBase.

Definition at line 99 of file OSGSimpleMaterialBase.h.

00100     {
00101         AmbientFieldId       = Inherited::NextFieldId,
00102         DiffuseFieldId       = AmbientFieldId       + 1,
00103         SpecularFieldId      = DiffuseFieldId       + 1,
00104         ShininessFieldId     = SpecularFieldId      + 1,
00105         EmissionFieldId      = ShininessFieldId     + 1,
00106         TransparencyFieldId  = EmissionFieldId      + 1,
00107         LitFieldId           = TransparencyFieldId  + 1,
00108         ColorMaterialFieldId = LitFieldId           + 1,
00109         NextFieldId          = ColorMaterialFieldId + 1
00110     };


Constructor & Destructor Documentation

SimpleMaterial::SimpleMaterial void   )  [protected]
 

Definition at line 137 of file OSGSimpleMaterial.cpp.

00137                                    :
00138     Inherited(),
00139     _materialChunk(NullFC),
00140     _blendChunk   (NullFC)
00141 {
00142 }

SimpleMaterial::SimpleMaterial const SimpleMaterial source  )  [protected]
 

Definition at line 144 of file OSGSimpleMaterial.cpp.

00144                                                            :
00145      Inherited    (source               ),
00146     _materialChunk(source._materialChunk),
00147     _blendChunk   (source._blendChunk   )
00148 {
00149 }

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

Definition at line 151 of file OSGSimpleMaterial.cpp.

References _blendChunk, _materialChunk, and osg::subRefCP().

00152 {
00153     subRefCP(_materialChunk);
00154     subRefCP(_blendChunk   );    
00155 }


Member Function Documentation

* static const char* osg::SimpleMaterial::getClassname void   )  [inline, static]
 

Reimplemented from osg::ChunkMaterial.

Definition at line 66 of file OSGSimpleMaterial.h.

00066 { return "SimpleMaterial"; };

void SimpleMaterial::changed BitVector  whichField,
UInt32  origin
[virtual]
 

Reimplemented from osg::ChunkMaterial.

Reimplemented in osg::SimpleTexturedMaterial.

Definition at line 157 of file OSGSimpleMaterial.cpp.

References osg::ChunkMaterial::changed().

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

00158 {
00159     Inherited::changed(whichField, origin);
00160 }

void SimpleMaterial::dump UInt32  uiIndent = 0,
const BitVector  bvFlags = 0
const [virtual]
 

Reimplemented from osg::ChunkMaterial.

Reimplemented in osg::SimpleTexturedMaterial.

Definition at line 287 of file OSGSimpleMaterial.cpp.

References osg::ChunkMaterialBase::_mfChunks, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::FieldContainerPtrBase::dump(), osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::SimpleMaterialBase::getAmbient(), osg::SimpleMaterialBase::getDiffuse(), osg::SimpleMaterialBase::getEmission(), osg::SimpleMaterialBase::getLit(), osg::SimpleMaterialBase::getShininess(), osg::SimpleMaterialBase::getSpecular(), osg::SimpleMaterialBase::getTransparency(), osg::indentLog(), PLOG, and osg::FCDumpFlags::RefCount.

00289 {
00290 
00291     SimpleMaterialPtr thisP(*this);
00292 
00293     thisP.dump(uiIndent, FCDumpFlags::RefCount);
00294 
00295     indentLog(uiIndent, PLOG);
00296     PLOG << "SimpleMaterial at " << this << std::endl;
00297 
00298     indentLog(uiIndent, PLOG);
00299     PLOG << "\tambient: " << getAmbient() << std::endl;
00300 
00301     indentLog(uiIndent, PLOG);
00302     PLOG << "\tdiffuse: " << getDiffuse()  << std::endl;
00303 
00304     indentLog(uiIndent, PLOG);
00305     PLOG << "\tspecular: " << getSpecular()  << std::endl;
00306 
00307     indentLog(uiIndent, PLOG);
00308     PLOG << "\tshininess: " << getShininess()  << std::endl;
00309 
00310     indentLog(uiIndent, PLOG);
00311     PLOG << "\temission: " << getEmission()  << std::endl;
00312 
00313     indentLog(uiIndent, PLOG);
00314     PLOG << "\ttransparency: " << getTransparency()  << std::endl;
00315 
00316     indentLog(uiIndent, PLOG);
00317     PLOG << "\tlit: " << getLit() << std::endl;
00318 
00319     indentLog(uiIndent, PLOG);
00320     PLOG << "\tChunks: " << std::endl;
00321 
00322     for(MFStateChunkPtr::const_iterator i = _mfChunks.begin();
00323             i != _mfChunks.end(); i++)
00324     {
00325         indentLog(uiIndent, PLOG);
00326         PLOG << "\t" << *i << std::endl;
00327     }
00328 
00329     indentLog(uiIndent, PLOG);
00330     PLOG << "SimpleMaterial end " << this << std::endl;
00331 }

StatePtr SimpleMaterial::makeState void   )  [virtual]
 

Create a osg::State that represents this Material and return it.

Reimplemented from osg::ChunkMaterial.

Reimplemented in osg::SimpleTexturedMaterial.

Definition at line 164 of file OSGSimpleMaterial.cpp.

References _blendChunk, _materialChunk, osg::ChunkMaterialBase::_mfChunks, osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::beginEditCP(), osg::StateBase::create(), osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::endEditCP(), osg::SimpleMaterialBase::getAmbient(), osg::SimpleMaterialBase::getColorMaterial(), osg::SimpleMaterialBase::getDiffuse(), osg::SimpleMaterialBase::getEmission(), osg::SimpleMaterialBase::getLit(), osg::SimpleMaterialBase::getShininess(), osg::SimpleMaterialBase::getSpecular(), osg::SimpleMaterialBase::getTransparency(), isTransparent(), prepareLocalChunks(), and osg::Color4< ValueTypeT >::setValuesRGBA().

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

00165 {
00166     StatePtr state = State::create();
00167 
00168     Color3f v3;
00169     Color4f v4;
00170     float alpha = 1.f - getTransparency();
00171 
00172     prepareLocalChunks();
00173 
00174     beginEditCP(_materialChunk);
00175     {
00176          v3 = getAmbient(); 
00177          v4.setValuesRGBA(v3[0], v3[1], v3[2], alpha);
00178         _materialChunk->setAmbient(v4);
00179 
00180          v3 = getDiffuse(); 
00181          v4.setValuesRGBA(v3[0], v3[1], v3[2], alpha);
00182         _materialChunk->setDiffuse(v4);
00183 
00184          v3 = getSpecular(); 
00185          v4.setValuesRGBA(v3[0], v3[1], v3[2], alpha);
00186         _materialChunk->setSpecular(v4);
00187 
00188         _materialChunk->setShininess(getShininess());
00189 
00190          v3 = getEmission(); 
00191          v4.setValuesRGBA(v3[0], v3[1], v3[2], alpha);
00192         _materialChunk->setEmission(v4);
00193         
00194         _materialChunk->setLit(getLit());
00195         _materialChunk->setColorMaterial(getColorMaterial());
00196     }
00197     endEditCP  (_materialChunk);
00198 
00199     state->addChunk(_materialChunk);
00200 
00201     if(isTransparent())
00202     {
00203         state->addChunk(_blendChunk);
00204     }
00205 
00206     for(MFStateChunkPtr::iterator i  = _mfChunks.begin();
00207                                   i != _mfChunks.end(); 
00208                                 ++i)
00209     {
00210         state->addChunk(*i);
00211     }
00212 
00213     return state;
00214 }

void SimpleMaterial::rebuildState void   )  [virtual]
 

Rebuild the internal State. Just collects the chunks in the State.

Reimplemented from osg::ChunkMaterial.

Reimplemented in osg::SimpleTexturedMaterial.

Definition at line 216 of file OSGSimpleMaterial.cpp.

References _blendChunk, _materialChunk, osg::ChunkMaterialBase::_mfChunks, osg::Material::_pState, osg::addRefCP(), osg::MField< FieldTypeT, fieldNameSpace >::begin(), osg::beginEditCP(), osg::StateBase::create(), osg::MField< FieldTypeT, fieldNameSpace >::end(), osg::endEditCP(), osg::SimpleMaterialBase::getAmbient(), osg::SimpleMaterialBase::getColorMaterial(), osg::SimpleMaterialBase::getDiffuse(), osg::SimpleMaterialBase::getEmission(), osg::SimpleMaterialBase::getLit(), osg::SimpleMaterialBase::getShininess(), osg::SimpleMaterialBase::getSpecular(), osg::SimpleMaterialBase::getTransparency(), isTransparent(), osg::NullFC, prepareLocalChunks(), and osg::Color4< ValueTypeT >::setValuesRGBA().

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

00217 {
00218     Color3f v3;
00219     Color4f v4;
00220     Real32  alpha = 1.f - getTransparency();
00221 
00222     if(_pState != NullFC)
00223     {
00224         _pState->clearChunks();
00225     }
00226     else
00227     {
00228         _pState = State::create();
00229 
00230         addRefCP(_pState);
00231     }
00232 
00233     prepareLocalChunks();
00234 
00235     beginEditCP(_materialChunk);
00236     {
00237         v3 = getAmbient();
00238         v4.setValuesRGBA(v3[0], v3[1], v3[2], alpha);
00239 
00240         _materialChunk->setAmbient(v4);
00241 
00242         v3 = getDiffuse();
00243         v4.setValuesRGBA(v3[0], v3[1], v3[2], alpha);
00244         
00245         _materialChunk->setDiffuse(v4);
00246         
00247         v3 = getSpecular();
00248         v4.setValuesRGBA(v3[0], v3[1], v3[2], alpha);
00249         
00250         _materialChunk->setSpecular(v4);
00251         
00252         _materialChunk->setShininess(getShininess());
00253         
00254         v3 = getEmission();
00255         v4.setValuesRGBA(v3[0], v3[1], v3[2], alpha);
00256         
00257         _materialChunk->setEmission(v4);
00258         
00259         _materialChunk->setLit(getLit());
00260         _materialChunk->setColorMaterial(getColorMaterial());
00261     }
00262     endEditCP  (_materialChunk);
00263 
00264     _pState->addChunk(_materialChunk);
00265 
00266     if(isTransparent())
00267     {
00268         _pState->addChunk(_blendChunk);
00269     }
00270 
00271     MFStateChunkPtr::iterator it        = _mfChunks.begin();
00272     MFStateChunkPtr::iterator chunksEnd = _mfChunks.end();
00273 
00274     for(; it != chunksEnd; ++it)
00275     {
00276         _pState->addChunk(*it);
00277     }
00278 }

bool SimpleMaterial::isTransparent void   )  const [virtual]
 

Check if the Material (i.e. any of its chunks) is transparent..

Reimplemented from osg::ChunkMaterial.

Reimplemented in osg::SimpleTexturedMaterial.

Definition at line 280 of file OSGSimpleMaterial.cpp.

References osg::Eps, osg::SimpleMaterialBase::getTransparency(), and osg::ChunkMaterial::isTransparent().

Referenced by osg::SimpleTexturedMaterial::isTransparent(), makeState(), and rebuildState().

00281 {
00282     return ((getTransparency() > Eps) || (Inherited::isTransparent()));
00283 }

void SimpleMaterial::prepareLocalChunks void   )  [protected]
 

Reimplemented in osg::SimpleTexturedMaterial.

Definition at line 95 of file OSGSimpleMaterial.cpp.

References _blendChunk, _materialChunk, osg::addRefCP(), osg::beginEditCP(), osg::BlendChunkBase::create(), osg::MaterialChunkBase::create(), osg::endEditCP(), and osg::NullFC.

Referenced by makeState(), and rebuildState().

00096 {
00097     if(_materialChunk == NullFC)
00098     {
00099         _materialChunk = MaterialChunk::create();
00100 
00101         addRefCP(_materialChunk);
00102     }
00103 
00104     if(_blendChunk == NullFC)
00105     {
00106         _blendChunk    = BlendChunk   ::create();
00107 
00108         beginEditCP(_blendChunk);
00109         {
00110             _blendChunk->setSrcFactor (GL_SRC_ALPHA);
00111             _blendChunk->setDestFactor(GL_ONE_MINUS_SRC_ALPHA);
00112         }
00113         endEditCP  (_blendChunk);
00114 
00115         addRefCP   (_blendChunk);
00116     }
00117 }

void SimpleMaterial::initMethod void   )  [static, private]
 

Reimplemented from osg::ChunkMaterial.

Reimplemented in osg::SimpleTexturedMaterial.

Definition at line 123 of file OSGSimpleMaterial.cpp.

00124 {
00125 }

void osg::SimpleMaterial::operator= const SimpleMaterial source  )  [private]
 

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

Reimplemented from osg::ChunkMaterialBase.

Reimplemented in osg::SimpleTexturedMaterialBase.

Definition at line 58 of file OSGSimpleMaterialBase.inl.

References osg::SimpleMaterialBase::_type.

Referenced by osg::SimpleMaterialBase::create().

00059 {
00060     return _type; 
00061 } 

osg::UInt32 osg::SimpleMaterialBase::getClassTypeId void   )  [inline, static, inherited]
 

Reimplemented from osg::ChunkMaterialBase.

Reimplemented in osg::SimpleTexturedMaterialBase.

Definition at line 65 of file OSGSimpleMaterialBase.inl.

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

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

FieldContainerType & SimpleMaterialBase::getType void   )  [virtual, inherited]
 

Reimplemented from osg::ChunkMaterialBase.

Reimplemented in osg::SimpleTexturedMaterialBase.

Definition at line 184 of file OSGSimpleMaterialBase.cpp.

References osg::SimpleMaterialBase::_type.

00185 {
00186     return _type; 
00187 } 

const FieldContainerType & SimpleMaterialBase::getType void   )  const [virtual, inherited]
 

Reimplemented from osg::ChunkMaterialBase.

Reimplemented in osg::SimpleTexturedMaterialBase.

Definition at line 189 of file OSGSimpleMaterialBase.cpp.

References osg::SimpleMaterialBase::_type.

00190 {
00191     return _type;
00192 } 

UInt32 SimpleMaterialBase::getContainerSize void   )  const [virtual, inherited]
 

Reimplemented from osg::ChunkMaterialBase.

Reimplemented in osg::SimpleTexturedMaterialBase.

Definition at line 204 of file OSGSimpleMaterialBase.cpp.

00205 { 
00206     return sizeof(SimpleMaterial); 
00207 }

SFColor3f * osg::SimpleMaterialBase::getSFAmbient void   )  [inline, inherited]
 

Definition at line 101 of file OSGSimpleMaterialBase.inl.

References osg::SimpleMaterialBase::_sfAmbient.

00102 {
00103     return &_sfAmbient;
00104 }

SFColor3f * osg::SimpleMaterialBase::getSFDiffuse (&n