added main/Material module
git-svn-id: svn://anubis/fart/trunk@68 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
f087488b39
commit
04b8ea5f9e
9
main/Material.cc
Normal file
9
main/Material.cc
Normal 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
18
main/Material.h
Normal 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
|
||||
|
@ -169,6 +169,7 @@ Color Scene::traceRay(const Ray & ray)
|
||||
it++)
|
||||
{
|
||||
/* compute the Phong lighting for each hit */
|
||||
color = Color::white;
|
||||
}
|
||||
|
||||
return color;
|
||||
|
Loading…
x
Reference in New Issue
Block a user