|
Path Tracer
|
Models a refractive material. More...
#include <RefractiveMaterial.h>
Public Member Functions | |
| RefractiveMaterial (double refractiveIndex=1.5, DoubleVec3D emittance=0) | |
| Default and main constructor. More... | |
| RefractiveMaterial (const RefractiveMaterial &material) | |
| Copy constructor. More... | |
| double | getRefractiveIndex () const |
| Getter for the refractiveIndex attribute. More... | |
| void | setRefractiveIndex (double refractiveIndex) |
| Setter for the refractiveIndex attribute. More... | |
| Material * | deepCopy () const |
| Makes a deep copy of this material. More... | |
| DoubleUnitVec3D | getNewDirection (const Ray &previousRay, const DoubleUnitVec3D &normal) const |
| Computes the new ray direction. More... | |
| DoubleVec3D | computeCurrentRadiance (const DoubleVec3D &recursiveRadiance, double cosAngleNewDirectionNormal, bool nextEventEstimation=false) const |
| Computes the new radiance. More... | |
| bool | worksWithNextEventEstimation () const |
| Returns whether this material works with next event estimation. More... | |
| std::ostream & | getDescription (std::ostream &stream) const |
| Returns this material's description. More... | |
| std::string | getType () const |
| Returns "Refractive". More... | |
| json | getSpecificParametersJson () const |
| Converts this material's specific parameters to json. More... | |
| void | setSpecificParametersJson (const json &j) |
| Sets this material's specific parameters according to json. More... | |
Public Member Functions inherited from Material | |
| 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... | |
Models a refractive material.
| RefractiveMaterial::RefractiveMaterial | ( | double | refractiveIndex = 1.5, |
| DoubleVec3D | emittance = 0 |
||
| ) |
Default and main constructor.
| refractiveIndex | The refractive index of this material. |
| emittance | The radiance this material emits. |
| RefractiveMaterial::RefractiveMaterial | ( | const RefractiveMaterial & | material | ) |
Copy constructor.
| material | The material that will be copied. |
|
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. |
Implements Material.
|
virtual |
Makes a deep copy of this material.
Implements Material.
|
virtual |
Returns this material's description.
| stream | The current stream. |
Implements Material.
|
virtual |
Computes the new ray direction.
| previousRay | The ray that hits this material. |
| normal | The normal at the intersection. |
Implements Material.
| double RefractiveMaterial::getRefractiveIndex | ( | ) | const |
Getter for the refractiveIndex attribute.
|
virtual |
Converts this material's specific parameters to json.
Implements Material.
|
virtual |
| void RefractiveMaterial::setRefractiveIndex | ( | double | refractiveIndex | ) |
Setter for the refractiveIndex attribute.
| refractiveIndex | The new refractive index of this material. |
|
virtual |
Sets this material's specific parameters according to json.
| j | The json input. |
Implements Material.
|
virtual |