OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
BBox< T > Struct Template Reference

#include <BBox.h>

Public Member Functions

bool containsXY (T x, T y) const
 
bool contains (const Vec3< T > &pos) const
 
template<class U >
bool intersects (const BBox< U > &other) const
 
template<class U , class V >
bool intersectsCube (const Vec3< U > &center, V halfSide) const
 
template<class U >
bool intersectsCuboid (const Vec3< U > &center, const Vec3< U > &halfSize) const
 
Vec3< T > center () const
 
Vec3< T > size () const
 

Static Public Member Functions

static BBox cubic (const Vec3< T > &center, T halfSide)
 
static BBox forPoints (const Vec3< T > &a, const Vec3< T > &b)
 
static BBox forCylinder (const Vec3< T > bottomCenter, T radius, T height)
 

Public Attributes

x1 = 0
 
x2 = 0
 
y1 = 0
 
y2 = 0
 
z1 = 0
 
z2 = 0
 

Friends

BBox operator| (const BBox &l, const BBox &r)
 

Member Function Documentation

◆ center()

template<class T >
Vec3< T > BBox< T >::center ( ) const
inline

◆ contains()

template<class T >
bool BBox< T >::contains ( const Vec3< T > &  pos) const
inline

◆ containsXY()

template<class T >
bool BBox< T >::containsXY ( x,
y 
) const
inline

◆ cubic()

template<class T >
static BBox BBox< T >::cubic ( const Vec3< T > &  center,
halfSide 
)
inlinestatic
Parameters
centerCenter of the bounding box.
halfSideHalf the length of the edge of the resulting bounding box cube.
Returns
Cubic bounding box centered at center with sides twice the halfSide.

◆ forCylinder()

template<class T >
static BBox BBox< T >::forCylinder ( const Vec3< T >  bottomCenter,
radius,
height 
)
inlinestatic

◆ forPoints()

template<class T >
static BBox BBox< T >::forPoints ( const Vec3< T > &  a,
const Vec3< T > &  b 
)
inlinestatic
Parameters
aPoint a.
bPoint b.
Returns
Bounding box containing both passed points.

◆ intersects()

template<class T >
template<class U >
bool BBox< T >::intersects ( const BBox< U > &  other) const
inline

◆ intersectsCube()

template<class T >
template<class U , class V >
bool BBox< T >::intersectsCube ( const Vec3< U > &  center,
halfSide 
) const
inline

◆ intersectsCuboid()

template<class T >
template<class U >
bool BBox< T >::intersectsCuboid ( const Vec3< U > &  center,
const Vec3< U > &  halfSize 
) const
inline

◆ size()

template<class T >
Vec3< T > BBox< T >::size ( ) const
inline

Friends And Related Function Documentation

◆ operator|

template<class T >
BBox operator| ( const BBox< T > &  l,
const BBox< T > &  r 
)
friend

Member Data Documentation

◆ x1

template<class T >
T BBox< T >::x1 = 0

◆ x2

template<class T >
T BBox< T >::x2 = 0

◆ y1

template<class T >
T BBox< T >::y1 = 0

◆ y2

template<class T >
T BBox< T >::y2 = 0

◆ z1

template<class T >
T BBox< T >::z1 = 0

◆ z2

template<class T >
T BBox< T >::z2 = 0

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