nlohmann::json json
Definition: InterfaceGestion.h:14
Defines the Object3D 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
Abstract class for a three-dimentional object.
Definition: Object3D.h:121
Combination of an origin and a direction.
Definition: Ray.h:44
A triangle defined by its three vertices.
Definition: Triangle.h:119
void computeArea()
Computes this triangle's area.
Definition: Triangle.cpp:36
Object3D * deepCopy() const
Makes a deep copy of this object.
Definition: Triangle.cpp:42
void setVertex0(const DoubleVec3D &vertex)
Setter for the first vertex.
Definition: Triangle.cpp:30
DoubleVec3D getRandomPoint() const
Computes a random point on the object.
Definition: Triangle.cpp:74
std::ostream & getDescription(std::ostream &stream) const
Returns this object's description.
Definition: Triangle.cpp:98
DoubleVec3D getVertex0() const
Getter for the first vertex.
Definition: Triangle.cpp:20
void setLocationJson(const json &j)
Sets this object's location according to json.
Definition: Triangle.cpp:113
DoubleVec3D getMaxCoord() const
Returns the maximum coordinate of a cuboid containing this object.
Definition: Triangle.cpp:90
DoubleVec3D getMinCoord() const
Returns the minimum coordinate of a cuboid containing this object.
Definition: Triangle.cpp:82
DoubleVec3D getCenter() const
Getter for the center.
Definition: Triangle.cpp:24
DoubleVec3D getVertex2() const
Getter for the third vertex.
Definition: Triangle.cpp:22
Triangle()
Default constructor.
Definition: Triangle.cpp:4
std::string getType() const
Returns this object type.
Definition: Triangle.cpp:105
DoubleVec3D getVertex1() const
Getter for the second vertex.
Definition: Triangle.cpp:21
json getLocationJson() const
Converts this objects's location to json.
Definition: Triangle.cpp:107
double smallestPositiveIntersection(const Ray &ray) const
Computes the smallest positive intersection between the ray and this object.
Definition: Triangle.cpp:46
DoubleUnitVec3D getNormal(const DoubleVec3D &point) const
Computes the normal at a point on the object.
Definition: Triangle.cpp:67
void setVertex2(const DoubleVec3D &vertex)
Setter for the third vertex.
Definition: Triangle.cpp:32
void setVertex1(const DoubleVec3D &vertex)
Setter for the second vertex.
Definition: Triangle.cpp:31