79 const auto& pointXYZ = point.
getArray();
83 pointXYZ[0] < minXYZ[0]?minXYZ[0]:pointXYZ[0] > maxXYZ[0]?maxXYZ[0]:pointXYZ[0],
84 pointXYZ[1] < minXYZ[1]?minXYZ[1]:pointXYZ[1] > maxXYZ[1]?maxXYZ[1]:pointXYZ[1],
85 pointXYZ[2] < minXYZ[2]?minXYZ[2]:pointXYZ[2] > maxXYZ[2]?maxXYZ[2]:pointXYZ[2]
159 for (
auto i = 0; i < 3; i++) {
171 for (
auto i = 0; i < 3; i++) {
172 if (point[i] <
min[i])
min[i] = point[i];
173 if (point[i] >
max[i])
max[i] = point[i];
Axis aligned bounding box used for frustum, this is not directly connectable with physics engine.
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE6_INDICES
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE1_INDICES
BoundingBox()
Public constructor.
static STATIC_DLL_IMPEXT const array< array< int32_t, 3 >, 12 > facesVerticesIndexes
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE10_INDICES
void fromBoundingVolume(BoundingBox *original)
Set up this bounding volume from given bounding volume.
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE5_INDICES
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE2_INDICES
const Vector3 & getCenter() const
void fromBoundingVolumeWithTransform(BoundingBox *original, const Transform &transform)
Create bounding volume from given original(of same type) with applied transform.
static const array< array< int32_t, 3 >, 12 > * getFacesVerticesIndexes()
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE11_INDICES
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE7_INDICES
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE9_INDICES
void extend(const Vector3 &point)
Extend bounding box with given point.
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE4_INDICES
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE3_INDICES
const Vector3 & getDimensions() const
Vector3 computeClosestPointInBoundingBox(const Vector3 &point)
Compute closest point in bounding box of given point.
void extend(BoundingBox *boundingBox)
Extend bounding box with given bounding box.
const vector< Vector3 > & getVertices() const
Returns bounding box vertices.
void fromBoundingVolumeWithTransformMatrix(BoundingBox *original, const Matrix4x4 &transformMatrix)
Create bounding volume from given original(of same type) with applied transform matrix.
void update()
Updates this bounding box.
vector< Vector3 > vertices
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE0_INDICES
static STATIC_DLL_IMPEXT const array< int32_t, 3 > FACE8_INDICES
Oriented bounding box physics primitive.
Matrix4x4 class representing matrix4x4 mathematical structure and operations for 3d space.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
const array< float, 3 > & getArray() const
#define STATIC_DLL_IMPEXT