added main/Material module

git-svn-id: svn://anubis/fart/trunk@68 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2009-01-30 02:20:29 +00:00
parent f087488b39
commit 04b8ea5f9e
3 changed files with 28 additions and 0 deletions

9
main/Material.cc Normal file
View File

@ -0,0 +1,9 @@
#include "Material.h"
const Material Material::white(Color::white);
Material::Material(const Color & rgb)
{
m_rgb = rgb;
}

18
main/Material.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef MATERIAL_H
#define MATERIAL_H MATERIAL_H
#include "util/Color.h"
class Material
{
public:
Material(const Color & rgb = Color::white);
static const Material white;
protected:
Color m_rgb;
};
#endif

View File

@ -169,6 +169,7 @@ Color Scene::traceRay(const Ray & ray)
it++)
{
/* compute the Phong lighting for each hit */
color = Color::white;
}
return color;