GEL
2
GEL is a library for Geometry and Linear Algebra
|
00001 #ifndef __GEOMETRY_MATERIAL_H__ 00002 #define __GEOMETRY_MATERIAL_H__ 00003 00004 #include <string> 00005 #include <vector> 00006 #include "CGLA/Vec3f.h" 00007 #include "CGLA/Vec3i.h" 00008 00009 namespace Geometry 00010 { 00011 struct Material 00012 { 00014 std::string name; 00015 00017 float diffuse[4]; 00018 00020 float ambient[4]; 00021 00023 float specular[4]; 00024 00026 float shininess; 00027 00029 float ior_in; 00030 00032 float ior_out; 00033 00035 float transmission[3]; 00036 00045 int illum; 00046 00047 bool has_texture; 00048 std::string tex_path, tex_name; 00049 int tex_id; 00050 00051 Material(): name("default"), 00052 tex_path(""), tex_name(""), tex_id(-1) 00053 { 00054 ior_in = 1.5f; 00055 ior_out = 1.0f; 00056 shininess = 0.0f; 00057 diffuse[0] = 0.8f; 00058 diffuse[1] = 0.8f; 00059 diffuse[2] = 0.8f; 00060 diffuse[3] = 1.0f; 00061 ambient[0] = 0.2f; 00062 ambient[1] = 0.2f; 00063 ambient[2] = 0.2f; 00064 ambient[3] = 1.0f; 00065 specular[0] = 0.0f; 00066 specular[1] = 0.0f; 00067 specular[2] = 0.0f; 00068 specular[3] = 1.0f; 00069 transmission[0] = 0.0f; 00070 transmission[1] = 0.0f; 00071 transmission[2] = 0.0f; 00072 illum = 2; 00073 } 00074 }; 00075 } 00076 00077 #endif