|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
Oriented Bounding Box (OBB) primitive. More...
Classes | |
| class | mundy::OBB< Scalar, PointType, QuaternionType, HalfExtentsType > |
| Oriented Bounding Box: a center, a unit-quaternion orientation, and per-axis half-extents. More... | |
| struct | mundy::is_obb< T > |
Namespaces | |
| namespace | mundy |
Concepts | |
| concept | mundy::ValidOBBType |
Functions | |
Approximate equality | |
| template<ValidOBBType T1, ValidOBBType T2> | |
| constexpr bool | mundy::is_close (const T1 &a, const T2 &b, typename T1::value_type tol=get_comparison_tolerance< typename T1::value_type, typename T2::value_type >()) |
| template<ValidOBBType T1, ValidOBBType T2> | |
| constexpr bool | mundy::is_approx_close (const T1 &a, const T2 &b, typename T1::value_type tol=get_relaxed_comparison_tolerance< typename T1::value_type, typename T2::value_type >()) |
Intersection test | |
| template<ValidOBBType OBBType1, ValidOBBType OBBType2> | |
| constexpr bool | mundy::intersects (const OBBType1 &a, const OBBType2 &b) |
| Test whether two OBBs overlap using the Separating Axis Theorem (SAT). | |
Stream output | |
| template<ValidOBBType T> | |
| std::ostream & | mundy::operator<< (std::ostream &os, const T &obb) |
Point visitation | |
| template<ValidOBBType T, typename Functor> | |
| void | mundy::for_each_point (const T &obb, Functor &&f) |
| template<ValidOBBType T, typename Functor> | |
| void | mundy::for_each_point_mutable (T &obb, Functor &&f) |
Variables | |
| template<typename T> | |
| constexpr bool | mundy::is_obb_v = is_obb<T>::value |
An OBB is stored as three independent quantities:
Performance tests show that computing the relative rotation matrix R = mat(conj(q_A)*q_B) needed for an OBB–OBB SAT test costs essentially the same as R = Q_A^T Q_B when orientations are stored as rotation matrices (~6 ns on a Cascade Lake core), while the quaternion representation reduces the per-OBB memory footprint from 15 scalars to 10 scalars. On memory-bandwidth-bound GPU workloads — the primary use case for MundySearch narrow-phase excluders — the smaller footprint is preferred.