Definition of a bounding box which is aligned along the axis (BBox AABB).
: Describes a ray by a pair of unsigned int. The first one gives the source number (in the range 0-40...
base class for shapes (Cylindre, Mesh, Sphere, Triangle,...)
BBox box
Bounding box of the shape.
vec3 getPosition()
Get the position (center) of the sphere.
Sphere(const Sphere &other)
Copy constructor.
Sphere(vec3 pos, decimal r)
Constructor with the position pos and the radius r of the sphere.
virtual int form()
Return type of the shape.
virtual Shape * Clone()
Return a pointer to this sphere.
virtual bool getIntersection(Ray &ray, Intersection &inter)
Check if a ray intersect this sphere.
decimal getRadius()
Get the radius of the sphere.
Sphere()
Constructor, the Sphere is located at (0,0,0) with a radius 0.
decimal radius
Radius of the sphere.
void setRadius(decimal _radius)
Set the radius of the sphere.
vec3 position
Center of the sphere.
Sphere(Sphere *other)
Copy constructor from a pointed sphere.
void setPosition(const vec3 &_position)
Set the center of the sphere.
base_vec3< decimal > vec3