|
Path Tracer
|
Abstrat class that models a material. More...
#include <Material.h>
Public Member Functions | |
| Material (DoubleVec3D emittance=0) | |
| Default and main constructor. More... | |
| Material (const Material &material) | |
| Copy constructor. More... | |
| DoubleVec3D | getEmittance () const |
| Getter for the emittance attribute. More... | |
| void | setEmittance (DoubleVec3D emittance) |
| Setter for the emittance attribute. More... | |
| virtual Material * | deepCopy () const =0 |
| Makes a deep copy of this material. More... | |
| virtual DoubleUnitVec3D | getNewDirection (const Ray &previousRay, const DoubleUnitVec3D &normal) const =0 |
| Computes the new ray direction. More... | |
| virtual DoubleVec3D | computeCurrentRadiance (const DoubleVec3D &recursiveRadiance, double cosAngleNewDirectionNormal, bool nextEventEstimation=false) const =0 |
| Computes the new radiance. More... | |
| virtual bool | worksWithNextEventEstimation () const =0 |
| Returns whether this material works with next event estimation. More... | |
| virtual std::ostream & | getDescription (std::ostream &stream) const =0 |
| Returns this material's description. More... | |
| virtual std::string | getType () const =0 |
| Returns this material type. More... | |
| virtual json | getSpecificParametersJson () const =0 |
| Converts this material's specific parameters to json. More... | |
| virtual void | setSpecificParametersJson (const json &j)=0 |
| Sets this material's specific parameters according to json. More... | |
Abstrat class that models a material.
| Material::Material | ( | DoubleVec3D | emittance = 0 | ) |
Default and main constructor.
| emittance | The radiance this material emits. |
| Material::Material | ( | const Material & | material | ) |
Copy constructor.
| material | The material that will be copied. |
|
pure virtual |
Computes the new radiance.
| recursiveRadiance | The radiance recursively obtained. |
| cosAngleNewDirectionNormal | The cosine of the angle between the direction of the next ray and the normal at the intersection. |
| nextEventEstimation | Whether the radiance is obtained using the next event estimation algorithm. |
Implemented in SpecularMaterial, RefractiveMaterial, and DiffuseMaterial.
|
pure virtual |
Makes a deep copy of this material.
Implemented in SpecularMaterial, RefractiveMaterial, and DiffuseMaterial.
|
pure virtual |
Returns this material's description.
| stream | The current stream. |
Implemented in SpecularMaterial, RefractiveMaterial, and DiffuseMaterial.
| DoubleVec3D Material::getEmittance | ( | ) | const |
Getter for the emittance attribute.
|
pure virtual |
Computes the new ray direction.
| previousRay | The ray that hits this material. |
| normal | The normal at the intersection. |
Implemented in SpecularMaterial, RefractiveMaterial, and DiffuseMaterial.
|
pure virtual |
Converts this material's specific parameters to json.
Implemented in SpecularMaterial, RefractiveMaterial, and DiffuseMaterial.
|
pure virtual |
Returns this material type.
Implemented in SpecularMaterial, RefractiveMaterial, and DiffuseMaterial.
| void Material::setEmittance | ( | DoubleVec3D | emittance | ) |
Setter for the emittance attribute.
| emittance | The new emittance of this material. |
|
pure virtual |
Sets this material's specific parameters according to json.
| j | The json input. |
Implemented in SpecularMaterial, RefractiveMaterial, and DiffuseMaterial.
|
pure virtual |
Returns whether this material works with next event estimation.
Implemented in SpecularMaterial, RefractiveMaterial, and DiffuseMaterial.