Skip to content

dakku::Bounds3

3d bounding box More...

#include <bounds.h>

Inherits from dakku::BoundsBase< T, 3 >

Public Functions

Name
Bounds3(const BoundsBase< T, 3 > & base)

Additional inherited members

Public Functions inherited from dakku::BoundsBase< T, 3 >

Name
BoundsBase() =default
default constructor
BoundsBase(const Point< T, S > & p)
Construct a new Bounds2 with a point.
template <ArithmeticType U>
BoundsBase(const BoundsBase< U, S > & b)
type conversion
BoundsBase(const Point< T, S > & p1, const Point< T, S > & p2)
Construct a new Bounds Base object with two points (take min/max of them to pMin and pMax)
BoundsBase(const sol::table & table)
Vector< T, S > diagonal() const
get the diagonal of the bounding box
size_t max_extent() const
get the dimension who has the maximum extent
bool operator==(const BoundsBase & rhs) const
bool operator!=(const BoundsBase & rhs) const
Point< T, S > lerp(const Point< float, S > & t) const
linera interpolation between pMin and pMax
Vector< T, S > offset(const Point< T, S > & p) const
get the offset \(v\) of a point, p = o + v * d
bool overlaps(const BoundsBase & rhs) const
check whether two bounds overlaps
bool inside(const Point< T, S > & p) const
check whether point is inside the bounds (inclusive)
bool inside_exclusive(const Point< T, S > & p) const
check whether point is inside the bounds (exclusive)
void bounding_sphere(Point< T, S > & center, float & rad)
get the bounding sphere of the bounds
BoundsBase union_bounds(const BoundsBase & rhs) const
take the union of the two bounds
BoundsBase union_bounds(const Point< T, S > & p) const
take the union between bounds and a point
BoundsBase intersect(const BoundsBase & rhs) const
take the intersect between two bounds
std::string to_string() const

Public Attributes inherited from dakku::BoundsBase< T, 3 >

Name
Point< T, S > p_min
left bottom corner of the bounds
Point< T, S > p_max
right top corner of the bounds

Friends inherited from dakku::BoundsBase< T, 3 >

Name
bool overlaps(const BoundsBase & a, const BoundsBase & b)
check whether two bounds overlaps
bool inside(const Point< T, S > & p, const BoundsBase & b)
check whether point is inside the bounds (inclusive)
bool inside_exclusive(const Point< T, S > & p, const BoundsBase & b)
check whether point is inside the bounds (exclusive)
BoundsBase **[operator
BoundsBase **[operator
BoundsBase operator&(const BoundsBase & a, const BoundsBase & b)
take the intersect between two bounds
decltype(auto) distance_squared(const Point< T, S > & p, const BoundsBase< T, S > & b)
minimum squared distance between point and bounds, if inside return 0
decltype(auto) distance(const Point< T, S > & p, const BoundsBase< T, S > & b)
minimum distance between point and bounds, if inside return 0
std::ostream & operator<<(std::ostream & os, const BoundsBase & b)

Detailed Description

template <ArithmeticType T>
class dakku::Bounds3;

3d bounding box

Public Functions Documentation

function Bounds3

inline Bounds3(
    const BoundsBase< T, 3 > & base
)

Updated on 2022-04-30 at 15:46:11 +0000