Add Material class

This commit is contained in:
Eryn Wells 2013-09-11 08:56:28 -07:00
parent aed523d457
commit 51c79b9b76
3 changed files with 48 additions and 0 deletions

View file

@ -7,6 +7,7 @@ Import('env')
files = Split("""
basics.cc
light.cc
material.cc
object.cc
object_sphere.cc
scene.cc

23
src/material.cc Normal file
View file

@ -0,0 +1,23 @@
/* material.h
*
* Materials are applied to shapes and determine color, texture mapping, shading, etc.
*
* Eryn Wells <eryn@erynwells.me>
*/
#include "material.h"
Color
Material::get_color()
const
{
return color;
}
void
Material::set_color(const Color &c)
{
color = c;
}

24
src/material.h Normal file
View file

@ -0,0 +1,24 @@
/* material.h
*
* Materials are applied to shapes and determine color, texture mapping, shading, etc.
*
* Eryn Wells <eryn@erynwells.me>
*/
#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