#include <checkermaterial.h>
Inheritance diagram for CheckeredMaterial:
Public Member Functions | |
CheckeredMaterial (const CheckeredMaterial &other) | |
Copy constructor. | |
CheckeredMaterial (Material *one, Material *two, double scale) | |
virtual Magick::Color | get_color (const Point3D &intersesction_point) const |
See material.h for a full description of this method. | |
virtual double | get_diffuse (const Point3D &intersesction_point) const |
See material.h for a full description of this method. | |
virtual double | get_opacity (const Point3D &intersesction_point) const |
See material.h for a full description of this method. | |
virtual double | get_reflection (const Point3D &intersesction_point) const |
See material.h for a full description of this method. | |
virtual double | get_reflectivity (const Point3D &intersesction_point) const |
See material.h for a full description of this method. | |
virtual double | get_refraction_index (const Point3D &intersesction_point) const |
See material.h for a full description of this method. | |
virtual bool | is_light (const Point3D &intersesction_point) const |
Always returns false. | |
virtual void | set_diffuse (double diffuse) |
This method ignores the value passed in. | |
virtual void | set_is_light (bool v) |
This method ignores the value of v as checker materials never emit light. | |
virtual void | set_opacity (double opacity) |
This method ignores the value passed in. | |
virtual | ~CheckeredMaterial () |
Static Public Member Functions | |
static Material * | createCheckeredMaterial (std::map< std::string, std::string >) |
Factory method to create a checkered material from two other materials. | |
Protected Member Functions | |
int | choose_material (const Point3D &intersection_point) const |
Return 0 to use second material, nonzero to use first material. | |
Protected Attributes | |
Material * | m_material_one |
First material of composite. | |
Material * | m_material_two |
Second material of composite. | |
double | m_scale |
Scaling to apply to pattern. | |
Static Private Attributes | |
static StaticInit | m_init |
Force static initialization. | |
Classes | |
class | StaticInit |
Helper class to provide static initialization. More... |
Definition at line 15 of file checkermaterial.h.
Create a checkered material from two materials, scaled on all axis.
one | The first material in the checker pattern | |
two | The second material in the checker pattern | |
scale | The factor to scale the checker pattern by |
Definition at line 49 of file checkermaterial.h.
References m_material_one, m_material_two, and m_scale.
Referenced by createCheckeredMaterial().
Here is the caller graph for this function:
CheckeredMaterial::CheckeredMaterial | ( | const CheckeredMaterial & | other | ) | [inline] |
virtual CheckeredMaterial::~CheckeredMaterial | ( | ) | [inline, virtual] |
Definition at line 64 of file checkermaterial.h.
int CheckeredMaterial::choose_material | ( | const Point3D & | intersection_point | ) | const [protected] |
Return 0 to use second material, nonzero to use first material.
Definition at line 9 of file checkermaterial.cpp.
References m_scale, Point3D::x, Point3D::y, and Point3D::z.
Referenced by get_color(), get_diffuse(), get_opacity(), get_reflection(), get_reflectivity(), and get_refraction_index().
Here is the caller graph for this function:
Material * CheckeredMaterial::createCheckeredMaterial | ( | std::map< std::string, std::string > | ) | [static] |
Factory method to create a checkered material from two other materials.
Definition at line 105 of file checkermaterial.cpp.
References CheckeredMaterial(), Scene::get_instance(), and Scene::get_material().
Here is the call graph for this function:
Color CheckeredMaterial::get_color | ( | const Point3D & | intersesction_point | ) | const [virtual] |
See material.h for a full description of this method.
Implements Material.
Definition at line 33 of file checkermaterial.cpp.
References choose_material(), Material::get_color(), m_material_one, and m_material_two.
Here is the call graph for this function:
double CheckeredMaterial::get_diffuse | ( | const Point3D & | intersesction_point | ) | const [virtual] |
See material.h for a full description of this method.
Implements Material.
Definition at line 51 of file checkermaterial.cpp.
References choose_material(), Material::get_diffuse(), m_material_one, and m_material_two.
Here is the call graph for this function:
double CheckeredMaterial::get_opacity | ( | const Point3D & | intersesction_point | ) | const [virtual] |
See material.h for a full description of this method.
Implements Material.
Definition at line 90 of file checkermaterial.cpp.
References choose_material(), Material::get_opacity(), m_material_one, and m_material_two.
Here is the call graph for this function:
double CheckeredMaterial::get_reflection | ( | const Point3D & | intersesction_point | ) | const [virtual] |
See material.h for a full description of this method.
Implements Material.
Definition at line 66 of file checkermaterial.cpp.
References choose_material(), Material::get_reflection(), m_material_one, and m_material_two.
Here is the call graph for this function:
double CheckeredMaterial::get_reflectivity | ( | const Point3D & | intersesction_point | ) | const [virtual] |
See material.h for a full description of this method.
Implements Material.
Definition at line 74 of file checkermaterial.cpp.
References choose_material(), Material::get_reflectivity(), m_material_one, and m_material_two.
Here is the call graph for this function:
double CheckeredMaterial::get_refraction_index | ( | const Point3D & | intersesction_point | ) | const [virtual] |
See material.h for a full description of this method.
Implements Material.
Definition at line 82 of file checkermaterial.cpp.
References choose_material(), Material::get_refraction_index(), m_material_one, and m_material_two.
Here is the call graph for this function:
bool CheckeredMaterial::is_light | ( | const Point3D & | intersesction_point | ) | const [virtual] |
void CheckeredMaterial::set_diffuse | ( | double | diffuse | ) | [virtual] |
This method ignores the value passed in.
Implements Material.
Definition at line 59 of file checkermaterial.cpp.
References m_material_one, m_material_two, and Material::set_diffuse().
Here is the call graph for this function:
void CheckeredMaterial::set_is_light | ( | bool | v | ) | [virtual] |
This method ignores the value of v as checker materials never emit light.
Implements Material.
Definition at line 45 of file checkermaterial.cpp.
void CheckeredMaterial::set_opacity | ( | double | opacity | ) | [virtual] |
This method ignores the value passed in.
Implements Material.
Definition at line 98 of file checkermaterial.cpp.
References m_material_one, m_material_two, and Material::set_opacity().
Here is the call graph for this function:
CheckeredMaterial::StaticInit CheckeredMaterial::m_init [static, private] |
Material* CheckeredMaterial::m_material_one [protected] |
First material of composite.
Definition at line 31 of file checkermaterial.h.
Referenced by CheckeredMaterial(), get_color(), get_diffuse(), get_opacity(), get_reflection(), get_reflectivity(), get_refraction_index(), set_diffuse(), and set_opacity().
Material* CheckeredMaterial::m_material_two [protected] |
Second material of composite.
Definition at line 34 of file checkermaterial.h.
Referenced by CheckeredMaterial(), get_color(), get_diffuse(), get_opacity(), get_reflection(), get_reflectivity(), get_refraction_index(), set_diffuse(), and set_opacity().
double CheckeredMaterial::m_scale [protected] |
Scaling to apply to pattern.
Definition at line 39 of file checkermaterial.h.
Referenced by CheckeredMaterial(), and choose_material().