Defines the DiffuseMaterial class.
nlohmann::json json
Definition: InterfaceGestion.h:14
std::ostream & operator<<(std::ostream &stream, const Object3D &object)
Ostream operator.
Definition: Object3D.cpp:24
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
double getArea() const
Getter for this object's area.
Definition: Object3D.cpp:19
virtual DoubleVec3D getCenter() const =0
Returns this object's center.
virtual std::ostream & getDescription(std::ostream &stream) const =0
Returns this object's description.
double area
Stores the area of this object.
Definition: Object3D.h:126
virtual Object3D * deepCopy() const =0
Makes a deep copy of this object.
Object3D & operator=(const Object3D &otherObject)
Assignment operator.
Definition: Object3D.cpp:28
Material * getMaterial() const
Getter for the Material.
Definition: Object3D.cpp:18
virtual double smallestPositiveIntersection(const Ray &ray) const =0
Computes the smallest positive intersection between the ray and this object.
~Object3D()
Destructor.
Definition: Object3D.cpp:14
virtual DoubleVec3D getMinCoord() const =0
Returns the minimum coordinate of a cuboid containing this object.
void setMaterial(Material *material)
Setter for the Material.
Definition: Object3D.cpp:20
virtual DoubleVec3D getMaxCoord() const =0
Returns the maximum coordinate of a cuboid containing this object.
virtual void setLocationJson(const json &j)=0
Sets this object's location according to json.
virtual void computeArea()=0
Computes this object area.
virtual json getLocationJson() const =0
Converts this objects's location to json.
virtual std::string getType() const =0
Returns this object type.
Object3D()
Default constructor.
Definition: Object3D.cpp:4
virtual DoubleUnitVec3D getNormal(const DoubleVec3D &point) const =0
Computes the normal at a point on the object.
virtual DoubleVec3D getRandomPoint() const =0
Computes a random point on the object.
Combination of an origin and a direction.
Definition: Ray.h:44