added refraction parameters to materials
git-svn-id: svn://anubis/fart/trunk@374 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
3594dace7f
commit
e39dbf9279
@ -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());
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user