Move Vectormath main
C++20 game and graphics mathematics
Loading...
Searching...
No Matches
mv::math::Aabb3< T > Class Template Reference

#include <mv/math/geometry/Aabb3.hpp>

Public Types

using Component = T
 

Public Member Functions

 Aabb3 () noexcept
 
const Point3< T > & Minimum () const noexcept
 
const Point3< T > & Maximum () const noexcept
 
bool IsEmpty () const noexcept
 
bool IsValid () const noexcept
 
std::optional< Point3< T > > TryCenter () const noexcept
 
std::optional< Vec3< T > > TrySize () const noexcept
 
std::optional< Vec3< T > > TryHalfExtents () const noexcept
 
bool Contains (const Point3< T > &point) const noexcept
 
bool Contains (const Aabb3 &other) const noexcept
 
bool Intersects (const Aabb3 &other) const noexcept
 
Aabb3 Merged (const Aabb3 &other) const noexcept
 
Aabb3 Intersection (const Aabb3 &other) const noexcept
 
std::optional< Aabb3 > TryExpanded (const Point3< T > &point) const noexcept
 
std::optional< Point3< T > > TryClosestPoint (const Point3< T > &point) const noexcept
 
T Volume () const noexcept
 
T SurfaceArea () const noexcept
 
std::optional< std::array< Point3< T >, 8 > > TryCorners () const noexcept
 

Static Public Member Functions

static Aabb3 Empty () noexcept
 
static std::optional< Aabb3 > TryFromMinMax (const Point3< T > &minimum, const Point3< T > &maximum) noexcept
 
static std::optional< Aabb3 > TryFromCenterHalfExtents (const Point3< T > &center, const Vec3< T > &halfExtents) noexcept
 
static std::optional< Aabb3 > TryFromPoints (std::span< const Point3< T > > points) noexcept
 

Detailed Description

template<typename T>
requires std::is_arithmetic_v<T>
class mv::math::Aabb3< T >

Definition at line 20 of file Aabb3.hpp.

Member Typedef Documentation

◆ Component

template<typename T >
using mv::math::Aabb3< T >::Component = T

Definition at line 23 of file Aabb3.hpp.

Constructor & Destructor Documentation

◆ Aabb3()

template<typename T >
mv::math::Aabb3< T >::Aabb3 ( )
inlinenoexcept

Definition at line 25 of file Aabb3.hpp.

Member Function Documentation

◆ Contains() [1/2]

template<typename T >
bool mv::math::Aabb3< T >::Contains ( const Aabb3< T > &  other) const
inlinenoexcept

Definition at line 173 of file Aabb3.hpp.

◆ Contains() [2/2]

template<typename T >
bool mv::math::Aabb3< T >::Contains ( const Point3< T > &  point) const
inlinenoexcept

Definition at line 165 of file Aabb3.hpp.

◆ Empty()

template<typename T >
static Aabb3 mv::math::Aabb3< T >::Empty ( )
inlinestaticnoexcept

Definition at line 31 of file Aabb3.hpp.

◆ Intersection()

template<typename T >
Aabb3 mv::math::Aabb3< T >::Intersection ( const Aabb3< T > &  other) const
inlinenoexcept

Definition at line 209 of file Aabb3.hpp.

◆ Intersects()

template<typename T >
bool mv::math::Aabb3< T >::Intersects ( const Aabb3< T > &  other) const
inlinenoexcept

Definition at line 179 of file Aabb3.hpp.

◆ IsEmpty()

template<typename T >
bool mv::math::Aabb3< T >::IsEmpty ( ) const
inlinenoexcept

Definition at line 87 of file Aabb3.hpp.

◆ IsValid()

template<typename T >
bool mv::math::Aabb3< T >::IsValid ( ) const
inlinenoexcept

Definition at line 92 of file Aabb3.hpp.

◆ Maximum()

template<typename T >
const Point3< T > & mv::math::Aabb3< T >::Maximum ( ) const
inlinenoexcept

Definition at line 82 of file Aabb3.hpp.

◆ Merged()

template<typename T >
Aabb3 mv::math::Aabb3< T >::Merged ( const Aabb3< T > &  other) const
inlinenoexcept

Definition at line 190 of file Aabb3.hpp.

◆ Minimum()

template<typename T >
const Point3< T > & mv::math::Aabb3< T >::Minimum ( ) const
inlinenoexcept

Definition at line 77 of file Aabb3.hpp.

◆ SurfaceArea()

template<typename T >
T mv::math::Aabb3< T >::SurfaceArea ( ) const
inlinenoexcept

Definition at line 272 of file Aabb3.hpp.

◆ TryCenter()

template<typename T >
std::optional< Point3< T > > mv::math::Aabb3< T >::TryCenter ( ) const
inlinenoexcept

Definition at line 101 of file Aabb3.hpp.

◆ TryClosestPoint()

template<typename T >
std::optional< Point3< T > > mv::math::Aabb3< T >::TryClosestPoint ( const Point3< T > &  point) const
inlinenoexcept

Definition at line 244 of file Aabb3.hpp.

◆ TryCorners()

template<typename T >
std::optional< std::array< Point3< T >, 8 > > mv::math::Aabb3< T >::TryCorners ( ) const
inlinenoexcept

Definition at line 288 of file Aabb3.hpp.

◆ TryExpanded()

template<typename T >
std::optional< Aabb3 > mv::math::Aabb3< T >::TryExpanded ( const Point3< T > &  point) const
inlinenoexcept

Definition at line 224 of file Aabb3.hpp.

◆ TryFromCenterHalfExtents()

template<typename T >
static std::optional< Aabb3 > mv::math::Aabb3< T >::TryFromCenterHalfExtents ( const Point3< T > &  center,
const Vec3< T > &  halfExtents 
)
inlinestaticnoexcept

Definition at line 48 of file Aabb3.hpp.

◆ TryFromMinMax()

template<typename T >
static std::optional< Aabb3 > mv::math::Aabb3< T >::TryFromMinMax ( const Point3< T > &  minimum,
const Point3< T > &  maximum 
)
inlinestaticnoexcept

Definition at line 36 of file Aabb3.hpp.

◆ TryFromPoints()

template<typename T >
static std::optional< Aabb3 > mv::math::Aabb3< T >::TryFromPoints ( std::span< const Point3< T > >  points)
inlinestaticnoexcept

Definition at line 61 of file Aabb3.hpp.

◆ TryHalfExtents()

template<typename T >
std::optional< Vec3< T > > mv::math::Aabb3< T >::TryHalfExtents ( ) const
inlinenoexcept

Definition at line 144 of file Aabb3.hpp.

◆ TrySize()

template<typename T >
std::optional< Vec3< T > > mv::math::Aabb3< T >::TrySize ( ) const
inlinenoexcept

Definition at line 122 of file Aabb3.hpp.

◆ Volume()

template<typename T >
T mv::math::Aabb3< T >::Volume ( ) const
inlinenoexcept

Definition at line 256 of file Aabb3.hpp.


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