1 #ifndef BLUB_SPHERE_HPP
2 #define BLUB_SPHERE_HPP
20 : mRadius(radius), mCenter(center) {}
43 return ((v - mCenter).squaredLength() <= mRadius*mRadius);
48 bool contains(
const vector3& vec)
const
51 real getSquaredRadius()
const
53 return mRadius*mRadius;
56 bool inherts(axisAlignedBox aabb)
const;
66 #endif // BLUB_SPHERE_HPP
sphere(const vector3 ¢er, real radius)
Definition: sphere.hpp:19
real getRadius(void) const
Definition: sphere.hpp:23
sphere()
Definition: sphere.hpp:14
void setRadius(real radius)
Definition: sphere.hpp:26
const vector3 & getCenter(void) const
Definition: sphere.hpp:29
bool intersects(const sphere &s) const
Definition: sphere.cpp:9
bool intersects(const vector3 &v) const
Definition: sphere.hpp:41
Definition: vector3.hpp:26
Definition: axisAlignedBox.hpp:20
void setCenter(const vector3 ¢er)
Definition: sphere.hpp:32
void merge(const sphere &oth)
Definition: sphere.cpp:14
Definition: deadlineTimer.hpp:10
Definition: sphere.hpp:10