BoundingBox.pkg 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. $#include "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. bool operator == (const BoundingBox& rhs) const;
  13. void Define(const BoundingBox& box);
  14. void Define(const Rect& rect);
  15. void Define(const Vector3& min, const Vector3& max);
  16. void Define(float min, float max);
  17. void Define(const Vector3& point);
  18. void Define(const Frustum& frustum);
  19. void Define(const Polyhedron& poly);
  20. void Define(const Sphere& sphere);
  21. void Merge(const Vector3& point);
  22. void Merge(const BoundingBox& box);
  23. void Merge(const Frustum& frustum);
  24. void Merge(const Polyhedron& poly);
  25. void Merge(const Sphere& sphere);
  26. void Clip(const BoundingBox& box);
  27. void Transform(const Matrix3& transform);
  28. void Transform(const Matrix3x4& transform);
  29. void Clear();
  30. Vector3 Center() const;
  31. Vector3 Size() const;
  32. Vector3 HalfSize() const;
  33. BoundingBox Transformed(const Matrix3& transform) const;
  34. BoundingBox Transformed(const Matrix3x4& transform) const;
  35. Rect Projected(const Matrix4& projection) const;
  36. Intersection IsInside(const Vector3& point) const;
  37. Intersection IsInside(const BoundingBox& box) const;
  38. Intersection IsInsideFast(const BoundingBox& box) const;
  39. Intersection IsInside(const Sphere& sphere) const;
  40. Intersection IsInsideFast(const Sphere& sphere) const;
  41. String ToString() const;
  42. Vector3 min_ @ min;
  43. Vector3 max_ @ max;
  44. bool defined_ @ defined;
  45. tolua_readonly tolua_property__no_prefix Vector3 center;
  46. tolua_readonly tolua_property__no_prefix Vector3 size;
  47. tolua_readonly tolua_property__no_prefix Vector3 halfSize;
  48. };