Free Electron
Public Member Functions | Private Attributes | Related Functions | List of all members
fe::Box< N, T > Class Template Reference

N-dimensional axis-aligned bounding-box. More...

#include <Box.h>

Inheritance diagram for fe::Box< N, T >:
Inheritance graph
[legend]

Public Member Functions

 Box (const Vector< N, T > &location)
 
 Box (const Vector< N, T > &location, const Vector< N, T > &size)
 
 Box (const Box< N, T > &rhs)
 
Box< N, T > & operator= (const Box< N, T > &rhs)
 
Vector< N, T > & size (void)
 
const Vector< N, T > & size (void) const
 
- Public Member Functions inherited from fe::Vector< N, T >
 Vector (const Vector< N, T > &other)
 
template<typename U >
 Vector (const Vector< N, U > &other)
 
template<typename U >
 Vector (const Vector< N+1, U > &other)
 
template<typename U >
 Vector (const Vector< N+2, U > &other)
 
template<typename U >
 Vector (const Vector< N-1, U > &other)
 
template<typename U >
 Vector (const Vector< N-2, U > &other)
 
 Vector (const T *array)
 
 Vector (T x, T y, T z, T w, T v, T u)
 
 Vector (T x, T y, T z, T w, T v)
 
 Vector (T x, T y, T z, T w)
 
 Vector (T x, T y, T z)
 
 Vector (T x, T y)
 
 Vector (T x)
 
const T & operator[] (unsigned int index) const
 
T & operator[] (unsigned int index)
 
T * raw (void)
 
const T * raw (void) const
 
const T * temp (void) const
 
Vector< N, T > & operator= (const T *array)
 
Vector< N, T > & operator= (const Vector< N, T > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N, U > &other)
 
Vector< N, T > & operator= (const Vector< N+1, T > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N+1, U > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N+2, U > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N-1, U > &other)
 
template<typename U >
Vector< N, T > & operator= (const Vector< N-2, U > &other)
 
bool operator== (const Vector< N, T > &other) const
 
bool operator!= (const Vector< N, T > &other) const
 
template<>
 Vector (const Vector< 2, U > &other)
 

Private Attributes

Vector< N, T > m_size
 

Related Functions

(Note that these are not member functions.)

template<int N, class T , class U >
bool operator== (const Box< N, T > &lhs, const Box< N, U > &rhs)
 Test equality. More...
 
template<int N, class T , class U >
bool operator!= (const Box< N, T > &lhs, const Box< N, U > &rhs)
 Test inequality. More...
 
template<int N, class T , class U >
Box< N, T > & resize (Box< N, T > &lhs, const Vector< N, U > &size)
 Change the size. More...
 
template<int N, class T , class U , class V >
Box< N, T > & set (Box< N, T > &lhs, const Vector< N, U > &location, const Vector< N, V > &size)
 Redefine the spatial domain. More...
 
template<class T , class U , class V >
Box< 3, T > & set (Box< 3, T > &lhs, const Vector< 3, U > &center, V radius)
 Set the box to encapsulate the given sphere. More...
 
template<int N, class T >
width (const Box< N, T > &lhs)
 Get the box width. More...
 
template<int N, class T >
height (const Box< N, T > &lhs)
 Get the box height. More...
 
template<int N, class T >
depth (const Box< N, T > &lhs)
 Get the box depth. More...
 
template<class T , class U , class V , class W , class X >
Box< 2, T > & set (Box< 2, T > &lhs, U x, V y, W w, X h)
 Set by explicit elements (2D) More...
 
template<class T , class U , class V , class W , class X , class Y , class Z >
Box< 3, T > & set (Box< 3, T > &lhs, U x, V y, W z, X w, Y h, Z d)
 Set by explicit elements (3D) More...
 
template<class T , class U , class V >
Box< 2, T > & resize (Box< 2, T > &lhs, U w, V h)
 Resize by explicit elements (2D) More...
 
template<class T , class U , class V , class W >
Box< 3, T > & resize (Box< 3, T > &lhs, U w, V h, W d)
 Resize by explicit elements (3D) More...
 
template<class T , class U >
bool intersecting (const Box< 2, T > &box, const Vector< 2, U > &point)
 Returns true if the box contains the point. More...
 
template<class T , class U >
bool intersecting (const Box< 2, T > &box1, const Box< 2, U > &box2)
 Returns true if the boxes overlap. More...
 
template<class T , class U >
bool intersecting (const Box< 3, T > &box, const Vector< 3, U > &point)
 Returns true if the box contains the point. More...
 
template<class T , class U >
bool intersecting (const Box< 3, T > &box1, const Box< 3, U > &box2)
 Returns true if the boxes overlap. More...
 
FE_DL_EXPORT const Box3 aabb (const Vector3f &location, const Vector3f &span, F32 baseRadius, F32 endRadius)
 Returns Box enveloping a tapered cylinder. More...
 
FE_DL_EXPORT const Box3 aabb (const Vector3f &location, F32 radius)
 Returns Box enveloping a sphere. More...
 
template<int N, class T >
String print (const Box< N, T > &box)
 Print to a string. More...
 

Additional Inherited Members

- Public Attributes inherited from fe::Vector< N, T >
m_data [N]
 

Detailed Description

template<int N, class T>
class fe::Box< N, T >

N-dimensional axis-aligned bounding-box.

Friends And Related Function Documentation

◆ aabb() [1/2]

template<int N, class T>
FE_DL_EXPORT const Box3 aabb ( const Vector3f location,
const Vector3f span,
F32  baseRadius,
F32  endRadius 
)
related

Returns Box enveloping a tapered cylinder.

◆ aabb() [2/2]

template<int N, class T>
FE_DL_EXPORT const Box3 aabb ( const Vector3f location,
F32  radius 
)
related

Returns Box enveloping a sphere.

◆ depth()

template<int N, class T >
T depth ( const Box< N, T > &  lhs)
related

Get the box depth.

◆ height()

template<int N, class T >
T height ( const Box< N, T > &  lhs)
related

Get the box height.

◆ intersecting() [1/4]

template<class T , class U >
bool intersecting ( const Box< 2, T > &  box,
const Vector< 2, U > &  point 
)
related

Returns true if the box contains the point.

◆ intersecting() [2/4]

template<class T , class U >
bool intersecting ( const Box< 2, T > &  box1,
const Box< 2, U > &  box2 
)
related

Returns true if the boxes overlap.

◆ intersecting() [3/4]

template<class T , class U >
bool intersecting ( const Box< 3, T > &  box,
const Vector< 3, U > &  point 
)
related

Returns true if the box contains the point.

◆ intersecting() [4/4]

template<class T , class U >
bool intersecting ( const Box< 3, T > &  box1,
const Box< 3, U > &  box2 
)
related

Returns true if the boxes overlap.

◆ operator!=()

template<int N, class T , class U >
bool operator!= ( const Box< N, T > &  lhs,
const Box< N, U > &  rhs 
)
related

Test inequality.

◆ operator==()

template<int N, class T , class U >
bool operator== ( const Box< N, T > &  lhs,
const Box< N, U > &  rhs 
)
related

Test equality.

◆ print()

template<int N, class T >
String print ( const Box< N, T > &  box)
related

Print to a string.

Referenced by fe::Box< 2, I32 >::print().

◆ resize() [1/3]

template<int N, class T , class U >
Box< N, T > & resize ( Box< N, T > &  lhs,
const Vector< N, U > &  size 
)
related

Change the size.

Referenced by fe::Box< 2, I32 >::set().

◆ resize() [2/3]

template<class T , class U , class V >
Box< 2, T > & resize ( Box< 2, T > &  lhs,
w,
h 
)
related

Resize by explicit elements (2D)

◆ resize() [3/3]

template<class T , class U , class V , class W >
Box< 3, T > & resize ( Box< 3, T > &  lhs,
w,
h,
d 
)
related

Resize by explicit elements (3D)

◆ set() [1/4]

template<int N, class T , class U , class V >
Box< N, T > & set ( Box< N, T > &  lhs,
const Vector< N, U > &  location,
const Vector< N, V > &  size 
)
related

Redefine the spatial domain.

◆ set() [2/4]

template<class T , class U , class V >
Box< 3, T > & set ( Box< 3, T > &  lhs,
const Vector< 3, U > &  center,
radius 
)
related

Set the box to encapsulate the given sphere.

◆ set() [3/4]

template<class T , class U , class V , class W , class X >
Box< 2, T > & set ( Box< 2, T > &  lhs,
x,
y,
w,
h 
)
related

Set by explicit elements (2D)

◆ set() [4/4]

template<class T , class U , class V , class W , class X , class Y , class Z >
Box< 3, T > & set ( Box< 3, T > &  lhs,
x,
y,
z,
w,
h,
d 
)
related

Set by explicit elements (3D)

◆ width()

template<int N, class T >
T width ( const Box< N, T > &  lhs)
related

Get the box width.


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