Sphere.pkg 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. bool operator == (const Sphere& rhs) const;
  11. void Define(const Sphere& sphere);
  12. void Define(const Vector3& center, float radius);
  13. void Define(const BoundingBox& box);
  14. void Define(const Frustum& frustum);
  15. void Define(const Polyhedron& poly);
  16. void Merge(const Vector3& point);
  17. void Merge(const BoundingBox& box);
  18. void Merge(const Frustum& frustum);
  19. void Merge(const Polyhedron& poly);
  20. void Merge(const Sphere& sphere);
  21. void Clear();
  22. Intersection IsInside(const Vector3& point) const;
  23. Intersection IsInside(const Sphere& sphere) const;
  24. Intersection IsInsideFast(const Sphere& sphere) const;
  25. Intersection IsInside(const BoundingBox& box) const;
  26. Intersection IsInsideFast(const BoundingBox& box) const;
  27. float Distance(const Vector3& point) const;
  28. Vector3 center_ @ center;
  29. float radius_ @ radius;
  30. bool defined_ @ defined;
  31. };