36 public:
enum ShadeMode {FLAT, GOURAUD, PHONG, BLINN, SHADE_COUNT};
37 public:
static std::string ShadeModeStr[SHADE_COUNT];
40 public:
static std::string BlendModeStr[BLEND_COUNT];
54 public: std::string GetName()
const;
59 public:
void SetTextureImage(
const std::string &_tex);
64 public:
void SetTextureImage(
const std::string &_tex,
65 const std::string &_resourcePath);
70 public: std::string GetTextureImage()
const;
74 public:
void SetAmbient(
const Color &_clr);
78 public:
Color GetAmbient()
const;
82 public:
void SetDiffuse(
const Color &_clr);
86 public:
Color GetDiffuse()
const;
90 public:
void SetSpecular(
const Color &_clr);
94 public:
Color GetSpecular()
const;
98 public:
void SetEmissive(
const Color &_clr);
102 public:
Color GetEmissive()
const;
106 public:
void SetTransparency(
double _t);
110 public:
double GetTransparency()
const;
114 public:
void SetShininess(
double _t);
118 public:
double GetShininess()
const;
124 public:
void SetBlendFactors(
double _srcFactor,
double _dstFactor);
129 public:
void GetBlendFactors(
double &_srcFactor,
double &_dstFactor);
149 public:
void SetPointSize(
double _size);
153 public:
double GetPointSize()
const;
157 public:
void SetDepthWrite(
bool _value);
161 public:
bool GetDepthWrite()
const;
165 public:
void SetLighting(
bool _value);
169 public:
bool GetLighting()
const;
177 _out <<
"Material:\n";
178 _out <<
" Name: " << _m.
name <<
"\n";
179 _out <<
" Texture: " << _m.
texImage <<
"\n";
180 _out <<
" Ambient: " << _m.
ambient <<
"\n";
181 _out <<
" Diffuse: " << _m.
diffuse <<
"\n";
182 _out <<
" Specular: " << _m.
specular <<
"\n";
183 _out <<
" Emissive: " << _m.
emissive <<
"\n";
185 _out <<
" Shininess: " << _m.
shininess <<
"\n";
186 _out <<
" BlendMode: " << BlendModeStr[_m.
blendMode] <<
"\n";
187 _out <<
" ShadeMode: " << ShadeModeStr[_m.
shadeMode] <<
"\n";
188 _out <<
" DepthWrite: " << _m.depthWrite <<
"\n";
226 private:
static unsigned int counter;
229 private:
bool depthWrite;
231 private:
bool lighting;
234 private:
double srcBlendFactor;
237 private:
double dstBlendFactor;