#include <noisematerial.h>
Inheritance diagram for NoiseMaterial:
Public Member Functions | |
virtual Magick::Color | get_color (const Point3D &intersesction_point) const |
Get color from point. | |
virtual double | get_diffuse (const Point3D &intersesction_point) const |
Get the diffuse coefficient of the material at the given point. | |
virtual double | get_opacity (const Point3D &intersesction_point) const |
Get opacity of object at the point. | |
virtual double | get_reflection (const Point3D &intersesction_point) const |
Get reflection coefficient for the given point. | |
virtual double | get_reflectivity (const Point3D &intersesction_point) const |
Get reflectivity (?) for the given point. TODO: figure out how reflection and reflectivity are different. | |
virtual double | get_refraction_index (const Point3D &intersesction_point) const |
virtual bool | is_light (const Point3D &intersesction_point) const |
Return if material emits light. Always returns false. | |
NoiseMaterial (const NoiseMaterial &other) | |
Copy construtor. | |
NoiseMaterial (Material *one, Material *two, double scale=1.0) | |
Create a noise-based material from two materials. | |
virtual void | set_diffuse (double diffuse) |
No operation. Value of diffuse is ignored. | |
virtual void | set_is_light (bool v) |
No operation. Value of v is ignored. | |
virtual void | set_opacity (double opacity) |
No operation. See other set methods. | |
virtual | ~NoiseMaterial () |
Static Public Member Functions | |
static Material * | createNoiseMaterial (std::map< std::string, std::string >) |
Factory method to create noise material. | |
Protected Member Functions | |
double | choose_material (const Point3D &intersection_point) const |
Protected Attributes | |
Material * | m_material_one |
First material element of composite. | |
Material * | m_material_two |
Second material element of composite. | |
Noise | m_noise |
Static noise instance. | |
double | m_scale |
Static Protected Attributes | |
static StaticInit | m_init |
Dummy variable to force static initialization. | |
Classes | |
class | StaticInit |
Helper class to provide static initialization. More... |
Definition at line 17 of file noisematerial.h.
Create a noise-based material from two materials.
Definition at line 54 of file noisematerial.h.
References m_material_one, m_material_two, and m_scale.
Referenced by createNoiseMaterial().
Here is the caller graph for this function:
NoiseMaterial::NoiseMaterial | ( | const NoiseMaterial & | other | ) | [inline] |
virtual NoiseMaterial::~NoiseMaterial | ( | ) | [inline, virtual] |
Definition at line 70 of file noisematerial.h.
double NoiseMaterial::choose_material | ( | const Point3D & | intersection_point | ) | const [protected] |
Calculate how much of first material contributes to overall material. This is a double ranging from 0.0 to 1.0. The amount of the second material to use is (1.0 - choose_material() )
Definition at line 10 of file noisematerial.cpp.
References Noise::get_noise(), m_noise, and m_scale.
Referenced by get_color(), get_diffuse(), get_opacity(), get_reflection(), get_reflectivity(), and get_refraction_index().
Here is the call graph for this function:
Here is the caller graph for this function:
Material * NoiseMaterial::createNoiseMaterial | ( | std::map< std::string, std::string > | ) | [static] |
Factory method to create noise material.
Definition at line 106 of file noisematerial.cpp.
References Scene::get_instance(), Scene::get_material(), and NoiseMaterial().
Here is the call graph for this function:
Color NoiseMaterial::get_color | ( | const Point3D & | intersesction_point | ) | const [virtual] |
Get color from point.
Implements Material.
Definition at line 15 of file noisematerial.cpp.
References choose_material(), Material::get_color(), Scene::get_instance(), m_material_one, and m_material_two.
Here is the call graph for this function:
double NoiseMaterial::get_diffuse | ( | const Point3D & | intersesction_point | ) | const [virtual] |
Get the diffuse coefficient of the material at the given point.
Implements Material.
Definition at line 55 of file noisematerial.cpp.
References choose_material(), Material::get_diffuse(), m_material_one, and m_material_two.
Here is the call graph for this function:
double NoiseMaterial::get_opacity | ( | const Point3D & | intersesction_point | ) | const [virtual] |
Get opacity of object at the point.
Implements Material.
Definition at line 93 of file noisematerial.cpp.
References choose_material(), Material::get_opacity(), m_material_one, and m_material_two.
Here is the call graph for this function:
double NoiseMaterial::get_reflection | ( | const Point3D & | intersesction_point | ) | const [virtual] |
Get reflection coefficient for the given point.
Implements Material.
Definition at line 67 of file noisematerial.cpp.
References choose_material(), Material::get_reflection(), m_material_one, and m_material_two.
Here is the call graph for this function:
double NoiseMaterial::get_reflectivity | ( | const Point3D & | intersesction_point | ) | const [virtual] |
Get reflectivity (?) for the given point. TODO: figure out how reflection and reflectivity are different.
Implements Material.
Definition at line 75 of file noisematerial.cpp.
References choose_material(), Material::get_reflectivity(), m_material_one, and m_material_two.
Here is the call graph for this function:
double NoiseMaterial::get_refraction_index | ( | const Point3D & | intersesction_point | ) | const [virtual] |
Get the refraction index at the point. This may produce some bizarre images if the refraction indexes vary among the materials. It will certainly be incorrect for a noise material as varying refraction within the object will not be honored. Only the location on the surface will be considered.
Implements Material.
Definition at line 83 of file noisematerial.cpp.
References choose_material(), Material::get_refraction_index(), m_material_one, and m_material_two.
Here is the call graph for this function:
bool NoiseMaterial::is_light | ( | const Point3D & | intersesction_point | ) | const [virtual] |
Return if material emits light. Always returns false.
Implements Material.
Definition at line 46 of file noisematerial.cpp.
void NoiseMaterial::set_diffuse | ( | double | diffuse | ) | [virtual] |
No operation. Value of diffuse is ignored.
Implements Material.
Definition at line 63 of file noisematerial.cpp.
void NoiseMaterial::set_is_light | ( | bool | v | ) | [virtual] |
No operation. Value of v is ignored.
Implements Material.
Definition at line 51 of file noisematerial.cpp.
void NoiseMaterial::set_opacity | ( | double | opacity | ) | [virtual] |
No operation. See other set methods.
Implements Material.
Definition at line 101 of file noisematerial.cpp.
NoiseMaterial::StaticInit NoiseMaterial::m_init [static, protected] |
Material* NoiseMaterial::m_material_one [protected] |
First material element of composite.
Definition at line 41 of file noisematerial.h.
Referenced by get_color(), get_diffuse(), get_opacity(), get_reflection(), get_reflectivity(), get_refraction_index(), and NoiseMaterial().
Material* NoiseMaterial::m_material_two [protected] |
Second material element of composite.
Definition at line 43 of file noisematerial.h.
Referenced by get_color(), get_diffuse(), get_opacity(), get_reflection(), get_reflectivity(), get_refraction_index(), and NoiseMaterial().
Noise NoiseMaterial::m_noise [protected] |
Static noise instance.
Definition at line 35 of file noisematerial.h.
Referenced by choose_material().
double NoiseMaterial::m_scale [protected] |
Definition at line 46 of file noisematerial.h.
Referenced by choose_material(), and NoiseMaterial().