
|
Material - encapsulates OpenGL glMaterial state
Inheritance:
Public Methods-
Material()
-
Material(const Material& mat, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
-
META_StateAttribute(osg, Material, MATERIAL)
-
virtual int compare(const StateAttribute& sa) const
- return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
-
virtual void getAssociatedModes(std::vector<GLMode>& modes) const
-
virtual void apply(State& state) const
-
inline void setColorMode(ColorMode mode)
-
inline ColorMode getColorMode() const
-
void setAmbient( Face face, const Vec4& ambient )
-
const Vec4& getAmbient(Face face) const
-
inline bool getAmbientFrontAndBack() const
-
void setDiffuse( Face face, const Vec4& diffuse )
-
const Vec4& getDiffuse(Face face) const
-
inline bool getDiffuseFrontAndBack() const
-
void setSpecular( Face face, const Vec4& specular )
- Set specular value of specified face(s) of the material, valid specular[03] range is 00 to 10
-
const Vec4& getSpecular(Face face) const
- Get the specular value for specified face
-
inline bool getSpecularFrontAndBack() const
- Get the whether specular values are equal for front and back faces
-
void setEmission( Face face, const Vec4& emission )
- Set emission value of specified face(s) of the material, valid emmison[03] range is 00 to 10
-
const Vec4& getEmission(Face face) const
- Get the emmsion value for specified face
-
inline bool getEmissionFrontAndBack() const
- Get the whether emission values are equal for front and back faces
-
void setShininess(Face face, float shininess )
- Set shininess of specified face(s) of the material, valid shininess range is 00 to 1280
-
float getShininess(Face face) const
- Get the shininess value for specified face
-
inline bool getShininessFrontAndBack() const
- Get the whether shininess values are equal for front and back faces
-
void setTransparency(Face face, float trans)
- Set the alpha value of ambient,diffuse,specular and emission colors, of specified face, to 1-transparency.
-
void setAlpha(Face face, float alpha)
- Set the alpha value of ambient,diffuse,specular and emission colors.
Public Members-
enum Face
-
enum ColorMode
Protected Fields-
ColorMode _colorMode
-
bool _ambientFrontAndBack
-
Vec4 _ambientFront
-
Vec4 _ambientBack
-
bool _diffuseFrontAndBack
-
Vec4 _diffuseFront
-
Vec4 _diffuseBack
-
bool _specularFrontAndBack
-
Vec4 _specularFront
-
Vec4 _specularBack
-
bool _emissionFrontAndBack
-
Vec4 _emissionFront
-
Vec4 _emissionBack
-
bool _shininessFrontAndBack
-
float _shininessFront
-
float _shininessBack
Protected Methods-
virtual ~Material()
Public Methods-
virtual Object* cloneType() const
-
virtual Object* clone(const CopyOp&) const
-
virtual bool isSameKindAs(const Object* obj) const
-
virtual const char* libraryName() const
-
virtual const char* className() const
-
virtual Type getType() const
-
virtual bool isTextureAttribute() const
-
bool operator < (const StateAttribute& rhs) const
-
bool operator == (const StateAttribute& rhs) const
-
bool operator != (const StateAttribute& rhs) const
-
virtual void compile(State&) const
Public Members-
typedef GLenum GLMode
-
typedef unsigned int GLModeValue
-
typedef unsigned int OverrideValue
-
enum Values
-
typedef unsigned int Type
-
enum Types
Inherited from Object:
Public Methods-
inline void setDataVariance(DataVariance dv)
-
inline DataVariance getDataVariance() const
-
inline void setUserData(Referenced* obj)
-
inline Referenced* getUserData()
-
inline const Referenced* getUserData() const
Public Members-
enum DataVariance
Protected Fields-
DataVariance _dataVariance
-
ref_ptr<Referenced> _userData
Public Methods-
inline Referenced& operator = (Referenced&)
-
static void setDeleteHandler(DeleteHandler* handler)
-
static DeleteHandler* getDeleteHandler()
-
inline void ref() const
-
inline void unref_nodelete() const
-
inline int referenceCount() const
-
inline void unref() const
Protected Fields-
mutable int _refCount
Documentation
Material - encapsulates OpenGL glMaterial state
Material()
Material(const Material& mat, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
- Copy constructor using CopyOp to manage deep vs shallow copy
META_StateAttribute(osg, Material, MATERIAL)
virtual int compare(const StateAttribute& sa) const
- return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs
virtual void getAssociatedModes(std::vector<GLMode>& modes) const
virtual void apply(State& state) const
enum Face
FRONT
BACK
FRONT_AND_BACK
enum ColorMode
AMBIENT
DIFFUSE
SPECULAR
EMISSION
AMBIENT_AND_DIFFUSE
OFF
inline void setColorMode(ColorMode mode)
inline ColorMode getColorMode() const
void setAmbient( Face face, const Vec4& ambient )
const Vec4& getAmbient(Face face) const
inline bool getAmbientFrontAndBack() const
void setDiffuse( Face face, const Vec4& diffuse )
const Vec4& getDiffuse(Face face) const
inline bool getDiffuseFrontAndBack() const
void setSpecular( Face face, const Vec4& specular )
- Set specular value of specified face(s) of the material,
valid specular[03] range is 00 to 10
const Vec4& getSpecular(Face face) const
- Get the specular value for specified face
inline bool getSpecularFrontAndBack() const
- Get the whether specular values are equal for front and back faces
void setEmission( Face face, const Vec4& emission )
- Set emission value of specified face(s) of the material,
valid emmison[03] range is 00 to 10
const Vec4& getEmission(Face face) const
- Get the emmsion value for specified face
inline bool getEmissionFrontAndBack() const
- Get the whether emission values are equal for front and back faces
void setShininess(Face face, float shininess )
- Set shininess of specified face(s) of the material, valid shininess range is 00 to 1280
float getShininess(Face face) const
- Get the shininess value for specified face
inline bool getShininessFrontAndBack() const
- Get the whether shininess values are equal for front and back faces
void setTransparency(Face face, float trans)
- Set the alpha value of ambient,diffuse,specular and emission colors,
of specified face, to 1-transparency. Valid transparency range is 0.0 to 1.0.
void setAlpha(Face face, float alpha)
- Set the alpha value of ambient,diffuse,specular and emission colors.
Valid transparency range is 0.0 to 1.0.
virtual ~Material()
ColorMode _colorMode
bool _ambientFrontAndBack
Vec4 _ambientFront
Vec4 _ambientBack
bool _diffuseFrontAndBack
Vec4 _diffuseFront
Vec4 _diffuseBack
bool _specularFrontAndBack
Vec4 _specularFront
Vec4 _specularBack
bool _emissionFrontAndBack
Vec4 _emissionFront
Vec4 _emissionBack
bool _shininessFrontAndBack
float _shininessFront
float _shininessBack
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.
|