#include <material.h>
Inheritance diagram for Material:
Public Member Functions | |
virtual Magick::Color | get_color (const Point3D &intersection_point, const Renderable *const obj) const |
virtual Magick::Color | get_color (const Point3D &intersection_point) const=0 |
virtual double | get_diffuse (const Point3D &intersection_point) const=0 |
virtual double | get_opacity (const Point3D &intersection_point) const=0 |
virtual double | get_reflection (const Point3D &intersection_point) const=0 |
virtual double | get_reflectivity (const Point3D &intersection_point) const=0 |
virtual double | get_refraction_index (const Point3D &intersection_point) const=0 |
virtual bool | is_light (const Point3D &intersection_point) const=0 |
virtual void | set_diffuse (double diffuse)=0 |
virtual void | set_is_light (bool v)=0 |
virtual void | set_opacity (double opacity)=0 |
virtual | ~Material () |
Virtual destructor. |
Having said all that, it might make sense anyway in the future to pass in the surface normal as well, or some other generic data about the primitive, to facilitate materials such as texture-maps or allow for bizarre, abstract materials.
Definition at line 17 of file material.h.
virtual Material::~Material | ( | ) | [inline, virtual] |
virtual Magick::Color Material::get_color | ( | const Point3D & | intersection_point, | |
const Renderable *const | obj | |||
) | const [inline, virtual] |
Calculate color at given point on the material given the surface normal passed in. The default behavior of this is to call Material::get_color(Point3D) ignoring the normal. If this behavior is not desired, override this method in child classes.
Reimplemented in ImageMap.
Definition at line 34 of file material.h.
References get_color().
Here is the call graph for this function:
virtual Magick::Color Material::get_color | ( | const Point3D & | intersection_point | ) | const [pure virtual] |
Calculate color at given point on the material.
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by Renderable::get_color(), NoiseMaterial::get_color(), MarbleMaterial::get_color(), CheckeredMaterial::get_color(), and get_color().
Here is the caller graph for this function:
virtual double Material::get_diffuse | ( | const Point3D & | intersection_point | ) | const [pure virtual] |
Get the diffusion coefficient at the point.
intersection_point | Point in space where ray intersected an object |
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by Renderable::get_diffuse(), NoiseMaterial::get_diffuse(), MarbleMaterial::get_diffuse(), and CheckeredMaterial::get_diffuse().
Here is the caller graph for this function:
virtual double Material::get_opacity | ( | const Point3D & | intersection_point | ) | const [pure virtual] |
Get the opacity of this material at the point.
intersection_point | Point in space where ray intersected an object |
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by Renderable::get_opacity(), NoiseMaterial::get_opacity(), MarbleMaterial::get_opacity(), and CheckeredMaterial::get_opacity().
Here is the caller graph for this function:
virtual double Material::get_reflection | ( | const Point3D & | intersection_point | ) | const [pure virtual] |
Get reflection coefficient at the point.
intersection_point | Point in space where ray intersected an object |
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by Renderable::get_reflection(), NoiseMaterial::get_reflection(), MarbleMaterial::get_reflection(), and CheckeredMaterial::get_reflection().
Here is the caller graph for this function:
virtual double Material::get_reflectivity | ( | const Point3D & | intersection_point | ) | const [pure virtual] |
Get reflectivity at the point.
intersection_point | Point in space where ray intersected an object |
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by Renderable::get_reflectivity(), NoiseMaterial::get_reflectivity(), MarbleMaterial::get_reflectivity(), and CheckeredMaterial::get_reflectivity().
Here is the caller graph for this function:
virtual double Material::get_refraction_index | ( | const Point3D & | intersection_point | ) | const [pure virtual] |
Get the index of refraction at the given point. Note that varying the index of refraction across the material will most likely return results that are not accurate.
intersection_point | Point in space where ray intersected an object |
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by Renderable::get_refraction_index(), NoiseMaterial::get_refraction_index(), MarbleMaterial::get_refraction_index(), and CheckeredMaterial::get_refraction_index().
Here is the caller graph for this function:
virtual bool Material::is_light | ( | const Point3D & | intersection_point | ) | const [pure virtual] |
Determine if material emits light at given point. Note: due to the rendering algoritm currently being used, varying this value based on position might have unexpected results.
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by Renderable::is_light().
Here is the caller graph for this function:
virtual void Material::set_diffuse | ( | double | diffuse | ) | [pure virtual] |
Set the diffusion coefficient for the object. Subclasses are not required to do anything useful with this information.
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by CheckeredMaterial::set_diffuse().
Here is the caller graph for this function:
virtual void Material::set_is_light | ( | bool | v | ) | [pure virtual] |
Set whether or not object emits light. Subclasses are not required to do anything useful with this information.
v | True if material emits light |
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by Renderable::set_is_light().
Here is the caller graph for this function:
virtual void Material::set_opacity | ( | double | opacity | ) | [pure virtual] |
Set opacity for the object. Subclasses are not required to do anything useful with this information.
opacity | The suggested opacity for the material |
Implemented in CheckeredMaterial, ImageMap, MarbleMaterial, NoiseMaterial, and SolidMaterial.
Referenced by CheckeredMaterial::set_opacity().
Here is the caller graph for this function: