radius = r;
}
+ void init(const Vector3& p, const Vector3& o)
+ {
+ point = p;
+ radius = (o - p).length();
+ }
+
void encloseVertices(const Vector3 vertices[], unsigned count);
void draw(Scalar alpha = 0.0) const;
};
+inline bool checkCollision(const Sphere& a, const Sphere& b)
+{
+ Scalar d = (a.point - b.point).length();
+ return d < (a.radius + b.radius);
+}
+
+
} // namespace Mf
#endif // _MOOF_SPHERE_HH_