21 #include "Geometry/mathlib.h"
35 name =
"unknow receptor";
47 return dynamic_cast<Shape*
>(
this);
vec3 centroid
Center point of the BBox.
std::string name
Each instantiated object may be named.
Receptor inherits from a Sphere Shape.
Recepteur(const Recepteur &other)
Copy constructor.
Shape * getShape()
Return the Shape.
unsigned int id
Shape identification.
virtual ~Recepteur()
Destructor.
bool intersectionRecepteur(vec3 &origine, vec3 &directeur, float tmax, Intersection &result)
Get the Intersection between a ray and this shape.
unsigned int getId()
Get/Set identification.
void setId(unsigned int _id)
Recepteur()
Default constructor.
vec3 getPosition()
Get the center of the bounding box.
Recepteur(const vec3 &pos, const decimal &r)
Constructor.
base class for shapes (Cylindre, Mesh, Sphere, Triangle,...)
BBox getBBox()
Return the bounding box.
base_vec3< decimal > vec3