diff --git a/src/SConscript b/src/SConscript index 0adc23b..0305912 100644 --- a/src/SConscript +++ b/src/SConscript @@ -7,6 +7,7 @@ Import('env') files = Split(""" basics.cc light.cc + material.cc object.cc object_sphere.cc scene.cc diff --git a/src/material.cc b/src/material.cc new file mode 100644 index 0000000..574ff58 --- /dev/null +++ b/src/material.cc @@ -0,0 +1,23 @@ +/* material.h + * + * Materials are applied to shapes and determine color, texture mapping, shading, etc. + * + * Eryn Wells + */ + +#include "material.h" + + +Color +Material::get_color() + const +{ + return color; +} + + +void +Material::set_color(const Color &c) +{ + color = c; +} diff --git a/src/material.h b/src/material.h new file mode 100644 index 0000000..4f28fa0 --- /dev/null +++ b/src/material.h @@ -0,0 +1,24 @@ +/* material.h + * + * Materials are applied to shapes and determine color, texture mapping, shading, etc. + * + * Eryn Wells + */ + +#ifndef __MATERIAL_H__ +#define __MATERIAL_H__ + +#include "basics.h" + + +class Material +{ +public: + Color get_color(); + void set_color(const Color &c); + +private: + Color color; +}; + +#endif