Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::AABB< Scalar, MinPointType, MaxPointType > Class Template Reference

#include <AABB.hpp>

Inheritance diagram for mundy::AABB< Scalar, MinPointType, MaxPointType >:
[legend]

Public Member Functions

Constructors and destructor
constexpr AABB ()
 Default constructor (enabled when both points are default constructible). Initializes the aabb inside-out so nothing can be inside this aabb.
constexpr AABB (const min_point_t &min_corner, const max_point_t &max_corner)
 Constructor to directly set the min and max corners.
template<ValidPointType OtherPointType1, ValidPointType OtherPointType2>
constexpr AABB (const OtherPointType1 &min_corner, const OtherPointType2 &max_corner)
 Constructor to directly set the min and max corners.
constexpr AABB (value_type x_min, value_type y_min, value_type z_min, value_type x_max, value_type y_max, value_type z_max)
 Constructor to directly set the min and max corners.
constexpr ~AABB ()=default
 Destructor.
constexpr AABB (const AABB< value_type, min_point_t, max_point_t > &other)
 Deep copy constructor.
template<typename OtherAABBType>
constexpr AABB (const OtherAABBType &other)
 Deep copy constructor.
constexpr AABB (AABB< value_type, min_point_t, max_point_t > &&other)
 Deep move constructor.
template<typename OtherAABBType>
constexpr AABB (OtherAABBType &&other)
 Deep move constructor.
Operators
constexpr AABB< value_type, min_point_t, max_point_t > & operator= (const AABB< value_type, min_point_t, max_point_t > &other)
 Copy assignment operator.
template<typename OtherAABBType>
constexpr AABB< value_type, min_point_t, max_point_t > & operator= (const OtherAABBType &other)
 Copy assignment operator.
constexpr AABB< value_type, min_point_t, max_point_t > & operator= (AABB< value_type, min_point_t, max_point_t > &&other)
 Move assignment operator.
template<typename OtherAABBType>
constexpr AABB< value_type, min_point_t, max_point_t > & operator= (OtherAABBType &&other)
 Move assignment operator.
Accessors
constexpr const value_typeoperator[] (const size_t &i) const
 Accesses the AABB as though it were an array of size 6 with the min then max corners.
constexpr value_typeoperator[] (const size_t &i)
 Accesses the AABB as though it were an array of size 6 with the min then max corners.
constexpr const min_point_tmin_corner () const
constexpr min_point_tmin_corner ()
constexpr const max_point_tmax_corner () const
constexpr max_point_tmax_corner ()
constexpr const value_typex_min () const
constexpr value_typex_min ()
constexpr const value_typey_min () const
constexpr value_typey_min ()
constexpr const value_typez_min () const
constexpr value_typez_min ()
constexpr const value_typex_max () const
constexpr value_typex_max ()
constexpr const value_typey_max () const
constexpr value_typey_max ()
constexpr const value_typez_max () const
constexpr value_typez_max ()
Casting
template<typename U>
constexpr auto cast () const
 Cast (and copy) the AABB to a different scalar type.
Setters
template<ValidPointType OtherPointType>
constexpr void set_min_corner (const OtherPointType &min_corner)
 Set the minimum corner.
constexpr void set_min_corner (const value_type &x, const value_type &y, const value_type &z)
 Set the minimum corner.
template<ValidPointType OtherPointType>
constexpr void set_max_corner (const OtherPointType &max_corner)
 Set the maximum corner.
constexpr void set_max_corner (const value_type &x, const value_type &y, const value_type &z)
 Set the maximum corner.

Friends

Friends <3
template<typename, ValidPointType, ValidPointType>
class AABB

Type aliases

using value_type = Scalar
 Our scalar type.
using min_point_t = MinPointType
 Our point type for the min corner.
using max_point_t = MaxPointType
 Our point type for the max corner.
static constexpr bool is_finite = true