00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef OPENCAL_UTILS_MATERIAL_H
00012
#define OPENCAL_UTILS_MATERIAL_H
00013
00014
00015
#include <OpenCAL/global.h>
00016
#include <OpenCAL/Color.h>
00017
using OpenCAL::Utils::Color;
00018
00019
namespace OpenCAL
00020 {
00021
namespace Utils
00022 {
00026 class OPENCAL_API Material
00027 {
00028
protected:
00029
00030
Color m_ambient, m_diffuse, m_specular, m_emission;
00031
float m_shininess;
00032
00033
public:
00034
00035 Material();
00036
virtual ~Material();
00037
00038
00039
const Color &getAmbient()
const {
return m_ambient; }
00040
Color *getAmbientP() {
return &m_ambient; }
00041
const Color &getDiffuse()
const {
return m_diffuse; }
00042
Color *getDiffuseP() {
return &m_diffuse; }
00043
const Color &getSpecular()
const {
return m_specular; }
00044
Color *getSpecularP() {
return &m_specular; }
00045
const Color &getEmission()
const {
return m_emission; }
00046
Color *getEmissionP() {
return &m_emission; }
00047
float getShininess()
const {
return m_shininess; }
00048
00049
00050
void setAmbient(
const Color &ambient) { m_ambient = ambient; }
00051
void setDiffuse(
const Color &diffuse) { m_diffuse = diffuse; }
00052
void setSpecular(
const Color &specular) { m_specular = specular; }
00053
void setEmission(
const Color &emission) { m_emission = emission; }
00054
void setShininess(
float shininess) { m_shininess = shininess; }
00055
00056
00057
void reset();
00058
00059
00060
00061
00062
00063 };
00064 }
00065 }
00066
00067
#endif // ifndef OPENCAL_UTILS_MATERIAL_H