Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Obb Class Reference

An oriented bounding box. More...

#include <Obb.h>

Classes

struct  Axis
 

Public Member Functions

 AZ_TYPE_INFO (Obb, "{004abd25-cf14-4eb3-bd41-022c247c07fa}")
 
const Vector3GetPosition () const
 
const QuaternionGetRotation () const
 
void SetRotation (const Quaternion &rotation)
 
const Vector3GetHalfLengths () const
 
void SetHalfLengths (const Vector3 &halfLengths)
 
Vector3 GetAxisX () const
 
Vector3 GetAxisY () const
 
Vector3 GetAxisZ () const
 
Vector3 GetAxis (int32_t index) const
 
float GetHalfLengthX () const
 
float GetHalfLengthY () const
 
float GetHalfLengthZ () const
 
float GetHalfLength (int32_t index) const
 
void SetPosition (const Vector3 &position)
 
void SetHalfLengthX (float halfLength)
 
void SetHalfLengthY (float halfLength)
 
void SetHalfLengthZ (float halfLength)
 
void SetHalfLength (int32_t index, float halfLength)
 
bool Contains (const Vector3 &point) const
 
float GetDistance (const Vector3 &point) const
 
float GetDistanceSq (const Vector3 &point) const
 
bool IsFinite () const
 
bool operator== (const Obb &rhs) const
 
bool operator!= (const Obb &rhs) const
 

Static Public Member Functions

static void Reflect (ReflectContext *context)
 
static Obb CreateFromPositionRotationAndHalfLengths (const Vector3 &position, const Quaternion &rotation, const Vector3 &halfLengths)
 
static Obb CreateFromAabb (const Aabb &aabb)
 Converts an AABB into an OBB.
 

Detailed Description

An oriented bounding box.

Member Function Documentation

◆ Contains()

AZ_MATH_INLINE bool AZ::Obb::Contains ( const Vector3 point) const

Returns whether a point is contained inside the OBB.

Parameters
pointThe point to be tested against the OBB.
Returns
Returns true if the point is inside the OBB, otherwise false.

◆ GetDistance()

AZ_MATH_INLINE float AZ::Obb::GetDistance ( const Vector3 point) const

Calculates distance from the OBB to specified point, a point inside the OBB will return zero.

Parameters
pointThe point for which to find the distance from the OBB.
Returns
The distance from the OBB, or 0 if the point is inside the OBB.

◆ GetDistanceSq()

AZ_MATH_INLINE float AZ::Obb::GetDistanceSq ( const Vector3 point) const

Calculates squared distance from the OBB to specified point, a point inside the OBB will return zero.

Parameters
pointThe point for which to find the squared distance from the OBB.
Returns
The squared distance from the OBB, or 0 if the point is inside the OBB.

◆ Reflect()

static void AZ::Obb::Reflect ( ReflectContext context)
static

AzCore Reflection.

Parameters
contextreflection context

The documentation for this class was generated from the following files: