libdonut  2.3.2
Application framework for cross-platform game development in C++20
Public Member Functions | Public Attributes | List of all members
donut::Box< L, T > Struct Template Reference

Generic axis-aligned box shape with minimum and maximum extents. More...

#include <donut/shapes.hpp>

Public Member Functions

constexpr bool contains (const Point< L, T > &point) const noexcept
 Check if a given point is contained within the extents of this box. More...
 

Public Attributes

Point< L, T > min
 Position with the minimum coordinates of the box extents on each coordinate axis. More...
 
Point< L, T > max
 Position with the maximum coordinates of the box extents on each coordinate axis. More...
 

Detailed Description

template<length_t L, typename T>
struct donut::Box< L, T >

Generic axis-aligned box shape with minimum and maximum extents.

Template Parameters
Lnumber of vector dimensions.
Tcomponent type for vector coordinates.

Member Function Documentation

◆ contains()

template<length_t L, typename T >
constexpr bool donut::Box< L, T >::contains ( const Point< L, T > &  point) const
constexprnoexcept

Check if a given point is contained within the extents of this box.

Returns
true if the box contains the given point, false otherwise.

Member Data Documentation

◆ min

template<length_t L, typename T >
Point<L, T> donut::Box< L, T >::min

Position with the minimum coordinates of the box extents on each coordinate axis.

◆ max

template<length_t L, typename T >
Point<L, T> donut::Box< L, T >::max

Position with the maximum coordinates of the box extents on each coordinate axis.


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