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 sphere described by its center and its radius.
Definition: Sphere.h:103
DoubleVec3D getMinCoord() const
Returns the minimum coordinate of a cuboid containing this object.
Definition: Sphere.cpp:70
std::ostream & getDescription(std::ostream &stream) const
Returns this object's description.
Definition: Sphere.cpp:78
DoubleVec3D getMaxCoord() const
Returns the maximum coordinate of a cuboid containing this object.
Definition: Sphere.cpp:74
json getLocationJson() const
Converts this objects's location to json.
Definition: Sphere.cpp:87
double smallestPositiveIntersection(const Ray &ray) const
Computes the smallest positive intersection between the ray and this object.
Definition: Sphere.cpp:37
void setLocationJson(const json &j)
Sets this object's location according to json.
Definition: Sphere.cpp:92
void setCenter(const DoubleVec3D ¢er)
Setter for the center.
Definition: Sphere.cpp:26
Sphere()
Default constructor.
Definition: Sphere.cpp:4
void computeArea()
Computes this sphere's area.
Definition: Sphere.cpp:31
double getRadius() const
Getter for the radius.
Definition: Sphere.cpp:22
DoubleVec3D getCenter() const
Getter for the center.
Definition: Sphere.cpp:21
DoubleVec3D getRandomPoint() const
Computes a random point on the object.
Definition: Sphere.cpp:65
Object3D * deepCopy() const
Makes a deep copy of this object.
Definition: Sphere.cpp:33
DoubleUnitVec3D getNormal(const DoubleVec3D &point) const
Computes the normal at a point on the object.
Definition: Sphere.cpp:60
void setRadius(double radius)
Setter for the radius.
Definition: Sphere.cpp:27
std::string getType() const
Returns this object type.
Definition: Sphere.cpp:85