class SG_EXPORT osg::Material

Material - encapsulates OpenGL glMaterial state

Inheritance:


Public Methods

[more] Material()
[more]virtual Object* clone() const
[more]virtual bool isSameKindAs(const Object* obj) const
[more]const char* className() const
[more]virtual const Type getType() const
[more]virtual void setStateSetModes(StateSet& ds, const GLModeValue value) const
[more]virtual void apply(State& state) const
[more]inline void setColorMode(const ColorMode mode)
[more]inline const ColorMode getColorMode() const
[more]void setAmbient( const Face face, const Vec4& ambient )
[more]const Vec4& getAmbient(const Face face) const
[more]inline const bool getAmbientFrontAndBack() const
[more]void setDiffuse( const Face face, const Vec4& diffuse )
[more]const Vec4& getDiffuse(const Face face) const
[more]inline const bool getDiffuseFrontAndBack() const
[more]void setSpecular( const Face face, const Vec4& specular )
Set specular value of specified face(s) of the material, valid specular[03] range is 00 to 10
[more]const Vec4& getSpecular(const Face face) const
Get the specular value for specified face
[more]inline const bool getSpecularFrontAndBack() const
Get the whether specular values are equal for front and back faces
[more]void setEmission( const Face face, const Vec4& emission )
Set emmision value of specified face(s) of the material, valid emmison[03] range is 00 to 10
[more]const Vec4& getEmission(const Face face) const
Get the emmsion value for specified face
[more]inline const bool getEmissionFrontAndBack() const
Get the whether emmision values are equal for front and back faces
[more]void setShininess( const Face face, float shininess )
Set shininess of specified face(s) of the material, valid shininess range is 00 to 10
[more]const float getShininess(const Face face) const
Get the shininess value for specified face
[more]inline const bool getShininessFrontAndBack() const
Get the whether shininess values are equal for front and back faces
[more]void setTransparency(const Face face, float trans)
Set the alpha value of ambient,diffuse,specular and emmission colors, of specified face, to 1-transparancy.
[more]void setAlpha(const Face face, float alpha)
Set the alpha value of ambient,diffuse,specular and emmission colors.

Public Members

[more]enum Face
[more]enum ColorMode

Protected Fields

[more]ColorMode _colorMode
[more]bool _ambientFrontAndBack
[more]Vec4 _ambientFront
[more]Vec4 _ambientBack
[more]bool _diffuseFrontAndBack
[more]Vec4 _diffuseFront
[more]Vec4 _diffuseBack
[more]bool _specularFrontAndBack
[more]Vec4 _specularFront
[more]Vec4 _specularBack
[more]bool _emissionFrontAndBack
[more]Vec4 _emissionFront
[more]Vec4 _emissionBack
[more]bool _shininessFrontAndBack
[more]float _shininessFront
[more]float _shininessBack

Protected Methods

[more]virtual ~Material()


Inherited from StateAttribute:

Public Methods

ovirtual void compile(State&) const

Public Members

otypedef GLenum GLMode
otypedef unsigned int GLModeValue
otypedef unsigned int OverrideValue
oenum Values
oenum Type


Inherited from Object:


Inherited from Referenced:

Public Methods

oinline Referenced& operator = (Referenced&)
oinline void ref() const
oinline void unref() const
oinline const int referenceCount() const

Protected Fields

omutable int _refCount


Documentation

Material - encapsulates OpenGL glMaterial state
o Material()

ovirtual Object* clone() const

ovirtual bool isSameKindAs(const Object* obj) const

oconst char* className() const

ovirtual const Type getType() const

ovirtual void setStateSetModes(StateSet& ds, const GLModeValue value) const

ovirtual void apply(State& state) const

oenum Face

o FRONT

o BACK

o FRONT_AND_BACK

oenum ColorMode

o AMBIENT

o DIFFUSE

o SPECULAR

o EMISSION

o AMBIENT_AND_DIFFUSE

o OFF

oinline void setColorMode(const ColorMode mode)

oinline const ColorMode getColorMode() const

ovoid setAmbient( const Face face, const Vec4& ambient )

oconst Vec4& getAmbient(const Face face) const

oinline const bool getAmbientFrontAndBack() const

ovoid setDiffuse( const Face face, const Vec4& diffuse )

oconst Vec4& getDiffuse(const Face face) const

oinline const bool getDiffuseFrontAndBack() const

ovoid setSpecular( const Face face, const Vec4& specular )
Set specular value of specified face(s) of the material, valid specular[03] range is 00 to 10

oconst Vec4& getSpecular(const Face face) const
Get the specular value for specified face

oinline const bool getSpecularFrontAndBack() const
Get the whether specular values are equal for front and back faces

ovoid setEmission( const Face face, const Vec4& emission )
Set emmision value of specified face(s) of the material, valid emmison[03] range is 00 to 10

oconst Vec4& getEmission(const Face face) const
Get the emmsion value for specified face

oinline const bool getEmissionFrontAndBack() const
Get the whether emmision values are equal for front and back faces

ovoid setShininess( const Face face, float shininess )
Set shininess of specified face(s) of the material, valid shininess range is 00 to 10

oconst float getShininess(const Face face) const
Get the shininess value for specified face

oinline const bool getShininessFrontAndBack() const
Get the whether shininess values are equal for front and back faces

ovoid setTransparency(const Face face, float trans)
Set the alpha value of ambient,diffuse,specular and emmission colors, of specified face, to 1-transparancy. Valid transparancy range is 0.0 to 1.0.

ovoid setAlpha(const Face face, float alpha)
Set the alpha value of ambient,diffuse,specular and emmission colors. Valid transparancy range is 0.0 to 1.0.

ovirtual ~Material()

oColorMode _colorMode

obool _ambientFrontAndBack

oVec4 _ambientFront

oVec4 _ambientBack

obool _diffuseFrontAndBack

oVec4 _diffuseFront

oVec4 _diffuseBack

obool _specularFrontAndBack

oVec4 _specularFront

oVec4 _specularBack

obool _emissionFrontAndBack

oVec4 _emissionFront

oVec4 _emissionBack

obool _shininessFrontAndBack

ofloat _shininessFront

ofloat _shininessBack


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.