1 #ifndef DEF_REFRACTIVEMATERIAL
2 #define DEF_REFRACTIVEMATERIAL
74 double refractiveIndex;
nlohmann::json json
Definition: InterfaceGestion.h:14
Defines the Material class and some functions around it.
A three-dimensional unit vector using doubles.
Definition: DoubleUnitVec3D.h:61
A three-dimensional vector using double values.
Definition: DoubleVec3D.h:190
Abstrat class that models a material.
Definition: Material.h:77
Combination of an origin and a direction.
Definition: Ray.h:44
Models a refractive material.
Definition: RefractiveMaterial.h:72
DoubleVec3D computeCurrentRadiance(const DoubleVec3D &recursiveRadiance, double cosAngleNewDirectionNormal, bool nextEventEstimation=false) const
Computes the new radiance.
Definition: RefractiveMaterial.cpp:57
RefractiveMaterial(double refractiveIndex=1.5, DoubleVec3D emittance=0)
Default and main constructor.
Definition: RefractiveMaterial.cpp:5
void setRefractiveIndex(double refractiveIndex)
Setter for the refractiveIndex attribute.
Definition: RefractiveMaterial.cpp:14
DoubleUnitVec3D getNewDirection(const Ray &previousRay, const DoubleUnitVec3D &normal) const
Computes the new ray direction.
Definition: RefractiveMaterial.cpp:22
double getRefractiveIndex() const
Getter for the refractiveIndex attribute.
Definition: RefractiveMaterial.cpp:13
void setSpecificParametersJson(const json &j)
Sets this material's specific parameters according to json.
Definition: RefractiveMaterial.cpp:76
bool worksWithNextEventEstimation() const
Returns whether this material works with next event estimation.
Definition: RefractiveMaterial.cpp:62
json getSpecificParametersJson() const
Converts this material's specific parameters to json.
Definition: RefractiveMaterial.cpp:75
std::ostream & getDescription(std::ostream &stream) const
Returns this material's description.
Definition: RefractiveMaterial.cpp:67
Material * deepCopy() const
Makes a deep copy of this material.
Definition: RefractiveMaterial.cpp:18
std::string getType() const
Returns "Refractive".
Definition: RefractiveMaterial.cpp:74