added refraction parameters to materials

git-svn-id: svn://anubis/fart/trunk@374 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2010-10-11 15:38:10 +00:00
parent 3594dace7f
commit e39dbf9279
2 changed files with 8 additions and 0 deletions

View File

@ -313,6 +313,10 @@ refptr<Material> Scene::processMaterial(refptr<Node> node)
{
material->setReflectance((*it)->getNumber());
}
else if ( typeid(**it) == typeid(RefractionNode) )
{
material->setRefraction((*it)->getNumber());
}
else if ( typeid(**it) == typeid(ShininessNode) )
{
material->setShininess((*it)->getNumber());

View File

@ -33,6 +33,9 @@ class Material
void setReflectance(double reflectance) { m_reflectance = reflectance; }
double getReflectance() const { return m_reflectance; }
void setRefraction(double refraction) { m_refraction = refraction; }
double getRefraction() const { return m_refraction; }
void setTransparency(double t) { m_transparency = t; }
double getTransparency() const { return m_transparency; }
@ -42,6 +45,7 @@ class Material
Color m_specular_color;
double m_shininess;
double m_reflectance;
double m_refraction;
double m_transparency;
};