Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

material.h

Go to the documentation of this file.
00001 
00008 #ifndef _MATERIAL_H
00009 #define _MATERIAL_H
00010 
00011 #include "main.h"
00012 
00013 #include <gfx/vec4.h>
00014 
00015 #include <string>
00016 using namespace std;
00017 
00018 class Material {
00019 public:
00020     Vec4f ambient;    
00021     Vec4f diffuse;    
00022     Vec4f specular;   
00023     Vec4f emissive;   
00024 
00025     double shininess;   
00026 
00027     uint texture;     
00028     string texture_filename;    
00029 
00030     Material(uint texture = 0) : texture(texture) {}
00031     Material(Vec4f amb, Vec4f diff, Vec4f spec, Vec4f emit, double shiny);
00032     Material(const Material& mat);
00033 
00034     Material copy_with_texture( string filename ) const;
00035 
00036     void reload_texture();
00037 
00038     void make_current() const;
00039 };
00040 
00041 uint load_gl_texture( string filename );
00042 
00043 extern Material red;
00044 extern Material green;
00045 extern Material blue;
00046 extern Material grey;
00047 
00048 #endif // header guard

Generated on Sat Mar 13 15:00:10 2004 by doxygen 1.3.5