Sphere.pkg 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $#include "Sphere.h"
  2. class Sphere
  3. {
  4. Sphere();
  5. Sphere(const Sphere& sphere);
  6. Sphere(const Vector3& center, float radius);
  7. Sphere(const BoundingBox& box);
  8. Sphere(const Frustum& frustum);
  9. Sphere(const Polyhedron& poly);
  10. ~Sphere();
  11. bool operator == (const Sphere& rhs) const;
  12. void Define(const Sphere& sphere);
  13. void Define(const Vector3& center, float radius);
  14. void Define(const BoundingBox& box);
  15. void Define(const Frustum& frustum);
  16. void Define(const Polyhedron& poly);
  17. void Merge(const Vector3& point);
  18. void Merge(const BoundingBox& box);
  19. void Merge(const Frustum& frustum);
  20. void Merge(const Polyhedron& poly);
  21. void Merge(const Sphere& sphere);
  22. void Clear();
  23. Intersection IsInside(const Vector3& point) const;
  24. Intersection IsInside(const Sphere& sphere) const;
  25. Intersection IsInsideFast(const Sphere& sphere) const;
  26. Intersection IsInside(const BoundingBox& box) const;
  27. Intersection IsInsideFast(const BoundingBox& box) const;
  28. float Distance(const Vector3& point) const;
  29. Vector3 center_ @ center;
  30. float radius_ @ radius;
  31. bool defined_ @ defined;
  32. };