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

osg::FresnelMaterialBase Class Reference

FresnelMaterial Base Class.

#include <OSGFresnelMaterialBase.h>

Inheritance diagram for osg::FresnelMaterialBase:

osg::ChunkMaterial osg::ChunkMaterialBase osg::Material osg::MaterialBase osg::AttachmentContainer osg::FieldContainer osg::FresnelMaterial List of all members.

Rendering

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

Public Types

typedef FresnelMaterialPtr 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,
  IndexFieldId = ColorMaterialFieldId + 1, ScaleFieldId = IndexFieldId + 1, BiasFieldId = ScaleFieldId + 1, ImageFieldId = BiasFieldId + 1,
  NextFieldId = ImageFieldId + 1
}

Public Member Functions

FieldContainer Get
*virtual FieldContainerTypegetType (void)
virtual const FieldContainerTypegetType (void) const
virtual UInt32 getContainerSize (void) const
Field Get
*SFColor3fgetSFAmbient (void)
 Get the FresnelMaterial::_sfAmbient field.
SFColor3fgetSFDiffuse (void)
 Get the FresnelMaterial::_sfDiffuse field.
SFColor3fgetSFSpecular (void)
 Get the FresnelMaterial::_sfSpecular field.
SFReal32getSFShininess (void)
 Get the FresnelMaterial::_sfShininess field.
SFColor3fgetSFEmission (void)
 Get the FresnelMaterial::_sfEmission field.
SFReal32getSFTransparency (void)
 Get the FresnelMaterial::_sfTransparency field.
SFBoolgetSFLit (void)
 Get the FresnelMaterial::_sfLit field.
SFGLenumgetSFColorMaterial (void)
 Get the FresnelMaterial::_sfColorMaterial field.
SFReal32getSFIndex (void)
 Get the FresnelMaterial::_sfIndex field.
SFReal32getSFScale (void)
 Get the FresnelMaterial::_sfScale field.
SFReal32getSFBias (void)
 Get the FresnelMaterial::_sfBias field.
SFImagePtrgetSFImage (void)
 Get the FresnelMaterial::_sfImage field.
Color3fgetAmbient (void)
 Get the value of the FresnelMaterial::_sfAmbient field.
const Color3fgetAmbient (void) const
 Get the value of the FresnelMaterial::_sfAmbient field.
Color3fgetDiffuse (void)
 Get the value of the FresnelMaterial::_sfDiffuse field.
const Color3fgetDiffuse (void) const
 Get the value of the FresnelMaterial::_sfDiffuse field.
Color3fgetSpecular (void)
 Get the value of the FresnelMaterial::_sfSpecular field.
const Color3fgetSpecular (void) const
 Get the value of the FresnelMaterial::_sfSpecular field.
Real32getShininess (void)
 Get the value of the FresnelMaterial::_sfShininess field.
const Real32getShininess (void) const
 Get the value of the FresnelMaterial::_sfShininess field.
Color3fgetEmission (void)
 Get the value of the FresnelMaterial::_sfEmission field.
const Color3fgetEmission (void) const
 Get the value of the FresnelMaterial::_sfEmission field.
Real32getTransparency (void)
 Get the value of the FresnelMaterial::_sfTransparency field.
const Real32getTransparency (void) const
 Get the value of the FresnelMaterial::_sfTransparency field.
bool & getLit (void)
 Get the value of the FresnelMaterial::_sfLit field.
const bool & getLit (void) const
 Get the value of the FresnelMaterial::_sfLit field.
GLenumgetColorMaterial (void)
 Get the value of the FresnelMaterial::_sfColorMaterial field.
const GLenumgetColorMaterial (void) const
 Get the value of the FresnelMaterial::_sfColorMaterial field.
Real32getIndex (void)
 Get the value of the FresnelMaterial::_sfIndex field.
const Real32getIndex (void) const
 Get the value of the FresnelMaterial::_sfIndex field.
Real32getScale (void)
 Get the value of the FresnelMaterial::_sfScale field.
const Real32getScale (void) const
 Get the value of the FresnelMaterial::_sfScale field.
Real32getBias (void)
 Get the value of the FresnelMaterial::_sfBias field.
const Real32getBias (void) const
 Get the value of the FresnelMaterial::_sfBias field.
ImagePtrgetImage (void)
 Get the value of the FresnelMaterial::_sfImage field.
const ImagePtrgetImage (void) const
 Get the value of the FresnelMaterial::_sfImage field.
Field Set
*void setAmbient (const Color3f &value)
 Set the value of the FresnelMaterial::_sfAmbient field.
void setDiffuse (const Color3f &value)
 Set the value of the FresnelMaterial::_sfDiffuse field.
void setSpecular (const Color3f &value)
 Set the value of the FresnelMaterial::_sfSpecular field.
void setShininess (const Real32 &value)
 Set the value of the FresnelMaterial::_sfShininess field.
void setEmission (const Color3f &value)
 Set the value of the FresnelMaterial::_sfEmission field.
void setTransparency (const Real32 &value)
 Set the value of the FresnelMaterial::_sfTransparency field.
void setLit (const bool &value)
 Set the value of the FresnelMaterial::_sfLit field.
void setColorMaterial (const GLenum &value)
 Set the value of the FresnelMaterial::_sfColorMaterial field.
void setIndex (const Real32 &value)
 Set the value of the FresnelMaterial::_sfIndex field.
void setScale (const Real32 &value)
 Set the value of the FresnelMaterial::_sfScale field.
void setBias (const Real32 &value)
 Set the value of the FresnelMaterial::_sfBias field.
void setImage (const ImagePtr &value)
 Set the value of the FresnelMaterial::_sfImage 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 void draw (DrawFunctor &func, DrawActionBase *action)
virtual void draw (Geometry *geo, DrawActionBase *action)
virtual StatePtr makeState (void)
virtual void rebuildState (void)
virtual bool isTransparent (void) const
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 FresnelMaterialPtr create (void)
 create a new instance of the class
static FresnelMaterialPtr 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 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 IndexFieldMask
static const osg::BitVector ScaleFieldMask
static const osg::BitVector BiasFieldMask
static const osg::BitVector ImageFieldMask
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
FresnelMaterialBase (void)
 FresnelMaterialBase (const FresnelMaterialBase &source)
Destructors
*virtual ~FresnelMaterialBase (void)
Sync
*void executeSyncImpl (FresnelMaterialBase *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)
MT Destruction
*virtual void onDestroy (void)

Protected Attributes

StatePtr _pState
Fields
*SFColor3f _sfAmbient
SFColor3f _sfDiffuse
SFColor3f _sfSpecular
SFReal32 _sfShininess
SFColor3f _sfEmission
SFReal32 _sfTransparency
SFBool _sfLit
SFGLenum _sfColorMaterial
SFReal32 _sfIndex
SFReal32 _sfScale
SFReal32 _sfBias
SFImagePtr _sfImage
Fields
*MFStateChunkPtr _mfChunks
MFInt32 _mfSlots
Fields
*SFInt32 _sfSortKey

Private Types

typedef ChunkMaterial Inherited

Private Member Functions

void operator= (const FresnelMaterialBase &source)

Static Private Attributes

static FieldDescription_desc []
 FresnelMaterial description.
static FieldContainerType _type

Friends

class FieldContainer

Detailed Description

Definition at line 92 of file OSGFresnelMaterialBase.h.


Member Typedef Documentation

typedef ChunkMaterial osg::FresnelMaterialBase::Inherited [private]
 

Reimplemented from osg::ChunkMaterial.

Reimplemented in osg::FresnelMaterial.

Definition at line 96 of file OSGFresnelMaterialBase.h.

typedef FresnelMaterialPtr osg::FresnelMaterialBase::Ptr
 

Reimplemented from osg::ChunkMaterialBase.

Definition at line 101 of file OSGFresnelMaterialBase.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
AmbientFieldId 
DiffuseFieldId 
SpecularFieldId 
ShininessFieldId 
EmissionFieldId 
TransparencyFieldId 
LitFieldId 
ColorMaterialFieldId 
IndexFieldId 
ScaleFieldId 
BiasFieldId 
ImageFieldId 
NextFieldId 

Reimplemented from osg::ChunkMaterialBase.

Definition at line 103 of file OSGFresnelMaterialBase.h.

00104     {
00105         AmbientFieldId       = Inherited::NextFieldId,
00106         DiffuseFieldId       = AmbientFieldId       + 1,
00107         SpecularFieldId      = DiffuseFieldId       + 1,
00108         ShininessFieldId     = SpecularFieldId      + 1,
00109         EmissionFieldId      = ShininessFieldId     + 1,
00110         TransparencyFieldId  = EmissionFieldId      + 1,
00111         LitFieldId           = TransparencyFieldId  + 1,
00112         ColorMaterialFieldId = LitFieldId           + 1,
00113         IndexFieldId         = ColorMaterialFieldId + 1,
00114         ScaleFieldId         = IndexFieldId         + 1,
00115         BiasFieldId          = ScaleFieldId         + 1,
00116         ImageFieldId         = BiasFieldId          + 1,
00117         NextFieldId          = ImageFieldId         + 1
00118     };


Constructor & Destructor Documentation

FresnelMaterialBase::FresnelMaterialBase void   )  [protected]
 

Definition at line 286 of file OSGFresnelMaterialBase.cpp.

00286                                              :
00287     _sfAmbient                (Color3f(0,0,0)), 
00288     _sfDiffuse                (Color3f(0,0,0)), 
00289     _sfSpecular               (Color3f(0,0,0)), 
00290     _sfShininess              (Real32(1)), 
00291     _sfEmission               (Color3f(0,0,0)), 
00292     _sfTransparency           (Real32(0)), 
00293     _sfLit                    (bool(true)), 
00294     _sfColorMaterial          (GLenum(GL_DIFFUSE)), 
00295     _sfIndex                  (Real32(0)), 
00296     _sfScale                  (Real32(1)), 
00297     _sfBias                   (Real32(1)), 
00298     _sfImage                  (), 
00299     Inherited() 
00300 {
00301 }

FresnelMaterialBase::FresnelMaterialBase const FresnelMaterialBase source  )  [protected]
 

Definition at line 307 of file OSGFresnelMaterialBase.cpp.

00307                                                                           :
00308     _sfAmbient                (source._sfAmbient                ), 
00309     _sfDiffuse                (source._sfDiffuse                ), 
00310     _sfSpecular               (source._sfSpecular               ), 
00311     _sfShininess              (source._sfShininess              ), 
00312     _sfEmission               (source._sfEmission               ), 
00313     _sfTransparency           (source._sfTransparency           ), 
00314     _sfLit                    (source._sfLit                    ), 
00315     _sfColorMaterial          (source._sfColorMaterial          ), 
00316     _sfIndex                  (source._sfIndex                  ), 
00317     _sfScale                  (source._sfScale                  ), 
00318     _sfBias                   (source._sfBias                   ), 
00319     _sfImage                  (source._sfImage                  ), 
00320     Inherited                 (source)
00321 {
00322 }

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

Definition at line 326 of file OSGFresnelMaterialBase.cpp.

00327 {
00328 }


Member Function Documentation

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

Reimplemented from osg::ChunkMaterialBase.

Definition at line 58 of file OSGFresnelMaterialBase.inl.

References _type.

Referenced by create().

00059 {
00060     return _type; 
00061 } 

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

Reimplemented from osg::ChunkMaterialBase.

Definition at line 65 of file OSGFresnelMaterialBase.inl.

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

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

FieldContainerType & FresnelMaterialBase::getType void   )  [virtual]
 

Reimplemented from osg::ChunkMaterialBase.

Definition at line 228 of file OSGFresnelMaterialBase.cpp.

References _type.

00229 {
00230     return _type; 
00231 } 

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

Reimplemented from osg::ChunkMaterialBase.

Definition at line 233 of file OSGFresnelMaterialBase.cpp.

References _type.

00234 {
00235     return _type;
00236 } 

UInt32 FresnelMaterialBase::getContainerSize void   )  const [virtual]
 

Reimplemented from osg::ChunkMaterialBase.

Definition at line 248 of file OSGFresnelMaterialBase.cpp.

00249 { 
00250     return sizeof(FresnelMaterial); 
00251 }

SFColor3f * osg::FresnelMaterialBase::getSFAmbient void   )  [inline]
 

Definition at line 101 of file OSGFresnelMaterialBase.inl.

References _sfAmbient.

00102 {
00103     return &_sfAmbient;
00104 }

SFColor3f * osg::FresnelMaterialBase::getSFDiffuse void   )  [inline]
 

Definition at line 108 of file OSGFresnelMaterialBase.inl.

References _sfDiffuse.

00109 {
00110     return &_sfDiffuse;
00111 }

SFColor3f * osg::FresnelMaterialBase::getSFSpecular void   )  [inline]
 

Definition at line 115 of file OSGFresnelMaterialBase.inl.

References _sfSpecular.

00116 {
00117     return &_sfSpecular;
00118 }

SFReal32 * osg::FresnelMaterialBase::getSFShininess void   )  [inline]
 

Definition at line 122 of file OSGFresnelMaterialBase.inl.

References _sfShininess.

00123 {
00124     return &_sfShininess;
00125 }

SFColor3f * osg::FresnelMaterialBase::getSFEmission void   )  [inline]
 

Definition at line 129 of file OSGFresnelMaterialBase.inl.

References _sfEmission.

00130 {
00131     return &_sfEmission;
00132 }

SFReal32 * osg::FresnelMaterialBase::getSFTransparency void   )  [inline]
 

Definition at line 136 of file OSGFresnelMaterialBase.inl.

References _sfTransparency.

00137 {
00138     return &_sfTransparency;
00139 }

SFBool * osg::FresnelMaterialBase::getSFLit void   )  [inline]
 

Definition at line 143 of file OSGFresnelMaterialBase.inl.

References _sfLit.

00144 {
00145     return &_sfLit;
00146 }

SFGLenum * osg::FresnelMaterialBase::getSFColorMaterial void   )  [inline]
 

Definition at line 150 of file OSGFresnelMaterialBase.inl.

References _sfColorMaterial.

00151 {
00152     return &_sfColorMaterial;
00153 }

SFReal32 * osg::FresnelMaterialBase::getSFIndex void   )  [inline]
 

Definition at line 157 of file OSGFresnelMaterialBase.inl.

References _sfIndex.

00158 {
00159     return &_sfIndex;
00160 }

SFReal32 * osg::FresnelMaterialBase::getSFScale void   )  [inline]
 

Definition at line 164 of file OSGFresnelMaterialBase.inl.

References _sfScale.

00165 {
00166     return &_sfScale;
00167 }

SFReal32 * osg::FresnelMaterialBase::getSFBias void   )  [inline]
 

Definition at line 171 of file OSGFresnelMaterialBase.inl.

References _sfBias.

00172 {
00173     return &_sfBias;
00174 }

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

Definition at line 178 of file OSGFresnelMaterialBase.inl.

References _sfImage.

00179 {
00180     return &_sfImage;
00181 }

Color3f & osg::FresnelMaterialBase::getAmbient void   )  [inline]
 

Definition at line 186 of file OSGFresnelMaterialBase.inl.

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

Referenced by osg::FresnelMaterial::makeState(), and osg::FresnelMaterial::rebuildState().

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

const Color3f & osg::FresnelMaterialBase::getAmbient void   )  const [inline]
 

Definition at line 193 of file OSGFresnelMaterialBase.inl.

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

00194 {
00195     return _sfAmbient.getValue();
00196 }

Color3f & osg::FresnelMaterialBase::getDiffuse void   )  [inline]
 

Definition at line 207 of file OSGFresnelMaterialBase.inl.

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

Referenced by osg::FresnelMaterial::makeState(), and osg::FresnelMaterial::rebuildState().

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

const Color3f & osg::FresnelMaterialBase::getDiffuse void   )  const [inline]
 

Definition at line 214 of file OSGFresnelMaterialBase.inl.

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

00215 {
00216     return _sfDiffuse.getValue();
00217 }

Color3f & osg::FresnelMaterialBase::getSpecular void   )  [inline]
 

Definition at line 228 of file OSGFresnelMaterialBase.inl.

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

Referenced by osg::FresnelMaterial::makeState(), and osg::FresnelMaterial::rebuildState().

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

const Color3f & osg::FresnelMaterialBase::getSpecular void   )  const [inline]
 

Definition at line 235 of file OSGFresnelMaterialBase.inl.

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

00236 {
00237     return _sfSpecular.getValue();
00238 }