|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
Oriented Bounding Box: a center, a unit-quaternion orientation, and per-axis half-extents. More...
#include <OBB.hpp>
Public Member Functions | |
Constructors and destructor | |
| constexpr | OBB () |
| Default constructor. Center and half-extents are zero-initialized; orientation is the identity quaternion; half-extents are set to the invalid sentinel -1. | |
| constexpr | OBB (const point_t ¢er, const value_type &half_extent) |
| Construct from a center, identity orientation, and uniform half-extent. | |
| constexpr | OBB (const point_t ¢er, const orientation_t &orientation, const half_extents_t &half_extents) |
| Construct from a center, orientation, and per-axis half-extents. | |
| constexpr | OBB (const point_t ¢er, const orientation_t &orientation, const value_type &hx, const value_type &hy, const value_type &hz) |
| Construct from a center, orientation, and per-axis half-extents given as scalars. | |
| constexpr | ~OBB ()=default |
| Destructor. | |
| constexpr | OBB (const OBB &other) |
| Copy constructor. | |
| constexpr | OBB (OBB &&other) |
| Move constructor. | |
Assignment operators | |
| constexpr OBB & | operator= (const OBB &other) |
| constexpr OBB & | operator= (OBB &&other) |
Accessors | |
| constexpr const point_t & | center () const |
| constexpr point_t & | center () |
| constexpr const orientation_t & | orientation () const |
| constexpr orientation_t & | orientation () |
| constexpr const half_extents_t & | half_extents () const |
| constexpr half_extents_t & | half_extents () |
| constexpr const value_type & | half_extent (int i) const |
| constexpr value_type & | half_extent (int i) |
Type aliases | |
| using | value_type = Scalar |
| using | point_t = PointType |
| using | orientation_t = QuaternionType |
| using | half_extents_t = HalfExtentsType |
| static constexpr bool | is_finite = true |
Setters | |
| template<typename, ValidPointType, ValidQuaternionType, ValidVector3Type> | |
| class | OBB |
| template<ValidPointType OtherPointType> | |
| constexpr void | set_center (const OtherPointType &c) |
| template<ValidQuaternionType OtherQuatType> | |
| constexpr void | set_orientation (const OtherQuatType &q) |
| template<ValidVector3Type OtherVecType> | |
| constexpr void | set_half_extents (const OtherVecType &he) |
| constexpr void | set_half_extents (const value_type &hx, const value_type &hy, const value_type &hz) |
| Scalar | Floating-point scalar type. |
| PointType | Point type for the center; defaults to Point<Scalar>. |
| QuaternionType | Quaternion type for the orientation; defaults to Quaternion<Scalar>. |
| HalfExtentsType | Vector3 type for the half-extents; defaults to Vector3<Scalar>. A view variant (e.g. an owning Vector3 aliasing field storage) may be substituted here to enable field-backed OBB components. |