Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

Material.h

00001 /*************************************************************************** 00002 * This file is part of OpenCAL: Open Computer Animation Library * 00003 * I created OpenCAL as my master's thesis Computer Science (multimedia) * 00004 * at the tUL university in Diepenbeek, Belgium * 00005 * * 00006 * Copyright (C) 2003-2004 by Jeroen Dierckx * 00007 * jeroen.dierckx@student.luc.ac.be * 00008 * * 00009 ***************************************************************************/ 00010 00011 #ifndef OPENCAL_UTILS_MATERIAL_H 00012 #define OPENCAL_UTILS_MATERIAL_H 00013 00014 // Includes 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 // Member variables 00030 Color m_ambient, m_diffuse, m_specular, m_emission; 00031 float m_shininess; 00032 00033 public: 00034 // Constructors and destructor 00035 Material(); 00036 virtual ~Material(); 00037 00038 // Get functions 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 // Set functions 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 // Other functions 00057 void reset(); 00058 /* 00059 #ifdef USE_OPENGL 00060 void applyGL(GLenum side = GL_FRONT); 00061 #endif // USE_OPENGL 00062 */ 00063 }; 00064 } 00065 } 00066 00067 #endif // ifndef OPENCAL_UTILS_MATERIAL_H

Generated on Sun Aug 15 19:19:22 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8