BoundingBox.pkg 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. $#include "Math/BoundingBox.h"
  2. class BoundingBox
  3. {
  4. BoundingBox();
  5. BoundingBox(const BoundingBox& box);
  6. BoundingBox(const Rect& rect);
  7. BoundingBox(const Vector3& min, const Vector3& max);
  8. BoundingBox(float min, float max);
  9. BoundingBox(const Frustum& frustum);
  10. BoundingBox(const Polyhedron& poly);
  11. BoundingBox(const Sphere& sphere);
  12. ~BoundingBox();
  13. bool operator ==(const BoundingBox& rhs) const;
  14. void Define(const BoundingBox& box);
  15. void Define(const Rect& rect);
  16. void Define(const Vector3& min, const Vector3& max);
  17. void Define(float min, float max);
  18. void Define(const Vector3& point);
  19. void Define(const Frustum& frustum);
  20. void Define(const Polyhedron& poly);
  21. void Define(const Sphere& sphere);
  22. void Merge(const Vector3& point);
  23. void Merge(const BoundingBox& box);
  24. void Merge(const Frustum& frustum);
  25. void Merge(const Polyhedron& poly);
  26. void Merge(const Sphere& sphere);
  27. void Clip(const BoundingBox& box);
  28. void Transform(const Matrix3& transform);
  29. void Transform(const Matrix3x4& transform);
  30. void Clear();
  31. bool Defined() const;
  32. Vector3 Center() const;
  33. Vector3 Size() const;
  34. Vector3 HalfSize() const;
  35. BoundingBox Transformed(const Matrix3& transform) const;
  36. BoundingBox Transformed(const Matrix3x4& transform) const;
  37. Rect Projected(const Matrix4& projection) const;
  38. Intersection IsInside(const Vector3& point) const;
  39. Intersection IsInside(const BoundingBox& box) const;
  40. Intersection IsInsideFast(const BoundingBox& box) const;
  41. Intersection IsInside(const Sphere& sphere) const;
  42. Intersection IsInsideFast(const Sphere& sphere) const;
  43. String ToString() const;
  44. Vector3 min_ @ min;
  45. Vector3 max_ @ max;
  46. tolua_readonly tolua_property__no_prefix Vector3 center;
  47. tolua_readonly tolua_property__no_prefix Vector3 size;
  48. tolua_readonly tolua_property__no_prefix Vector3 halfSize;
  49. };