/** * @return True if the sphere collides or is inside this frustum */ template<class T> bool Frustum<T>::collideWithSphere(const Sphere<T> &sphere) const { for (auto &plane : planes) { if (plane.distance(sphere.getCenterOfMass()) > sphere.getRadius()) { return false; } } return true; }