moved main/Material to util/Material
git-svn-id: svn://anubis/fart/trunk@136 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
7f9547c010
commit
cda03ad45a
5 files changed
+4
-3
No files matched your search
+1
-1
@@ -3,9 +3,9 @@
|
||||
#define LIGHTING_H LIGHTING_H
|
||||
|
||||
#include "Light.h"
|
||||
#include "Material.h"
|
||||
#include "util/Ray.h"
|
||||
#include "util/Color.h"
|
||||
#include "util/Material.h"
|
||||
#include "util/refptr.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
#include "Material.h"
|
||||
|
||||
const Material Material::white;
|
||||
|
||||
Material::Material()
|
||||
{
|
||||
m_diffuse_color = Color::white;
|
||||
m_specular_color = Color::white;
|
||||
m_shininess = 50.0;
|
||||
m_reflectance = 0.0;
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
|
||||
#ifndef MATERIAL_H
|
||||
#define MATERIAL_H MATERIAL_H
|
||||
|
||||
#include "util/Color.h"
|
||||
|
||||
class Material
|
||||
{
|
||||
public:
|
||||
/* static members */
|
||||
static const Material white;
|
||||
|
||||
Material();
|
||||
|
||||
void setAmbientColor(const Color & ambient)
|
||||
{
|
||||
m_ambient_color = ambient;
|
||||
}
|
||||
const Color & getAmbientColor() const { return m_ambient_color; }
|
||||
|
||||
void setDiffuseColor(const Color & diffuse)
|
||||
{
|
||||
m_diffuse_color = diffuse;
|
||||
}
|
||||
const Color & getDiffuseColor() const { return m_diffuse_color; }
|
||||
|
||||
void setSpecularColor(const Color & specular)
|
||||
{
|
||||
m_specular_color = specular;
|
||||
}
|
||||
const Color & getSpecularColor() const { return m_specular_color; }
|
||||
|
||||
void setShininess(double shininess) { m_shininess = shininess; }
|
||||
double getShininess() const { return m_shininess; }
|
||||
|
||||
void setReflectance(double reflectance) { m_reflectance = reflectance; }
|
||||
double getReflectance() const { return m_reflectance; }
|
||||
|
||||
protected:
|
||||
Color m_ambient_color;
|
||||
Color m_diffuse_color;
|
||||
Color m_specular_color;
|
||||
double m_shininess;
|
||||
double m_reflectance;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "util/refptr.h"
|
||||
#include "util/Ray.h"
|
||||
#include "util/Color.h"
|
||||
#include "util/Material.h"
|
||||
#include "shapes/Shape.h"
|
||||
#include "Light.h"
|
||||
|
||||
|
||||
Reference in new issue
Block a user