| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#pragma once |
| 6 |
|
| 7 |
#include <Jolt/Geometry/Triangle.h> |
| 8 |
#include <Jolt/Geometry/IndexedTriangle.h> |
| 9 |
#include <Jolt/Geometry/AABox.h> |
| 10 |
#include <Jolt/Math/Mat44.h> |
| 11 |
|
| 12 |
JPH_NAMESPACE_BEGIN |
| 13 |
|
| 14 |
class AABox; |
| 15 |
|
| 16 |
|
| 17 |
class JPH_EXPORT_GCC_BUG_WORKAROUND [[nodiscard]] OrientedBox |
| 18 |
{ |
| 19 |
public: |
| 20 |
JPH_OVERRIDE_NEW_DELETE |
| 21 |
|
| 22 |
|
| 23 |
OrientedBox() = default; |
| 24 |
OrientedBox(Mat44Arg inOrientation, Vec3Arg inHalfExtents) : mOrientation(inOrientation), mHalfExtents(inHalfExtents) { } |
| 25 |
|
| 26 |
|
| 27 |
OrientedBox(Mat44Arg inOrientation, const AABox &inBox) : OrientedBox(inOrientation.PreTranslated(inBox.GetCenter()), inBox.GetExtent()) { } |
| 28 |
|
| 29 |
|
| 30 |
bool Overlaps(const AABox &inBox, float inEpsilon = 1.0e-6f) const; |
| 31 |
|
| 32 |
|
| 33 |
bool Overlaps(const OrientedBox &inBox, float inEpsilon = 1.0e-6f) const; |
| 34 |
|
| 35 |
Mat44 mOrientation; |
| 36 |
Vec3 mHalfExtents; |
| 37 |
}; |
| 38 |
|
| 39 |
JPH_NAMESPACE_END |