7 #ifndef _MGMaterial_HH_
8 #define _MGMaterial_HH_
10 #include "mgGL/GLAttrib.h"
11 #include "mgGL/RenderAttr.h"
34 const float ambient[3],
35 const float diffuse[3],
36 const float specular[3],
37 const float emission[3],
51 for(
int i=0; i<3; i++) m_ambientColor[i]=ambientColor[i];
54 for(
int i=0; i<3; i++) ambientColor[i]=m_ambientColor[i];
64 for(
int i=0; i<3; i++) m_diffuseColor[i]=diffuseColor[i];
67 for(
int i=0; i<3; i++) diffuseColor[i]=m_diffuseColor[i];
77 for(
int i=0; i<3; i++) m_specularColor[i]=specularColor[i];
80 for(
int i=0; i<3; i++) specularColor[i]=m_specularColor[i];
83 m_specularColor[0]=v0;
84 m_specularColor[1]=v1;
85 m_specularColor[2]=v2;
90 for(
int i=0; i<3; i++) m_emissiveColor[i]=emissiveColor[i];
93 for(
int i=0; i<3; i++) emissiveColor[i]=m_emissiveColor[i];
96 m_emissiveColor[0]=v0;
97 m_emissiveColor[1]=v1;
98 m_emissiveColor[2]=v2;
106 void setTransparency(
float transparency);
113 std::ostream& out(std::ostream& ostrm)
const;
117 float m_ambientColor[4];
118 float m_diffuseColor[4];
119 float m_specularColor[4];
120 float m_emissiveColor[4];
126 #endif // _MGMaterial_HH_
void getDiffuseColor(float diffuseColor[3]) const
Definition: Material.h:66
RENDERSIDE
Definition: RenderAttr.h:32
void setShininess(float shininess)
Definition: Material.h:102
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
float getShininess() const
Definition: Material.h:103
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
void getAmbientColor(float ambientColor[3]) const
Definition: Material.h:53
void getEmissiveColor(float emissiveColor[3]) const
Definition: Material.h:92
void setDiffuseColor(float v0, float v1, float v2)
Definition: Material.h:69
float getTransparency() const
Definition: Material.h:107
void setAmbientColor(const float ambientColor[3])
Definition: Material.h:50
void setEmissiveColor(float v0, float v1, float v2)
Definition: Material.h:95
void setAmbientColor(float v0, float v1, float v2)
Definition: Material.h:56
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
void setSpecularColor(const float specularColor[3])
Definition: Material.h:76
long identify_type() const
Return This object's typeID.
Definition: Material.h:110
MGMaterial defines OpenGL's Material attributes.
Definition: Material.h:24
void getSpecularColor(float specularColor[3]) const
Definition: Material.h:79
void setDiffuseColor(const float diffuseColor[3])
Definition: Material.h:63
void setSpecularColor(float v0, float v1, float v2)
Definition: Material.h:82
void setEmissiveColor(const float emissiveColor[3])
Definition: Material.h:89