added main/Material module

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

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
#include "Material.h"
const Material Material::white(Color::white);
Material::Material(const Color & rgb)
{
m_rgb = rgb;
}
+18
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
+1
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;