ork::box3< type > Struct Template Reference
[math]

A 3D bounding box. More...

#include <box3.h>

List of all members.

Public Member Functions

 box3 ()
 Creates a new, empty bounding box.
 box3 (type xmin, type xmax, type ymin, type ymax, type zmin, type zmax)
 Creates a new bounding box with the given coordinates.
 box3 (const vec3< type > &p, const vec3< type > &q)
 Creates a new bounding box enclosing the two given points.
vec3< type > center () const
 Returns the center of this bounding box.
box3< type > enlarge (const vec3< type > &p) const
 Returns the bounding box containing this box and the given point.
box3< type > enlarge (const box3< type > &r) const
 Returns the bounding box containing this box and the given box.
bool contains (const vec3< type > &p) const
 Returns true if this bounding box contains the given point.
template<class t >
box3< t > cast ()
 Casts this bounding box to another base type.

Public Attributes

type xmin
 Minimum x coordinate.
type xmax
 Maximum x coordinate.
type ymin
 Minimum y coordinate.
type ymax
 Maximum y coordinate.
type zmin
 Minimum z coordinate.
type zmax
 Maximum z coordinate.

Detailed Description

template<typename type>
struct ork::box3< type >

A 3D bounding box.


Constructor & Destructor Documentation

template<typename type>
ork::box3< type >::box3 (  )  [inline]

Creates a new, empty bounding box.

template<typename type>
ork::box3< type >::box3 ( type  xmin,
type  xmax,
type  ymin,
type  ymax,
type  zmin,
type  zmax 
) [inline]

Creates a new bounding box with the given coordinates.

template<typename type>
ork::box3< type >::box3 ( const vec3< type > &  p,
const vec3< type > &  q 
) [inline]

Creates a new bounding box enclosing the two given points.


Member Function Documentation

template<typename type>
template<class t >
box3<t> ork::box3< type >::cast (  )  [inline]

Casts this bounding box to another base type.

template<typename type>
vec3<type> ork::box3< type >::center (  )  const [inline]

Returns the center of this bounding box.

template<typename type>
bool ork::box3< type >::contains ( const vec3< type > &  p  )  const [inline]

Returns true if this bounding box contains the given point.

Parameters:
p an arbitrary point.
template<typename type>
box3<type> ork::box3< type >::enlarge ( const box3< type > &  r  )  const [inline]

Returns the bounding box containing this box and the given box.

Parameters:
r an arbitrary bounding box.
template<typename type>
box3<type> ork::box3< type >::enlarge ( const vec3< type > &  p  )  const [inline]

Returns the bounding box containing this box and the given point.

Parameters:
p an arbitrary point.

Member Data Documentation

template<typename type>
type ork::box3< type >::xmax

Maximum x coordinate.

template<typename type>
type ork::box3< type >::xmin

Minimum x coordinate.

template<typename type>
type ork::box3< type >::ymax

Maximum y coordinate.

template<typename type>
type ork::box3< type >::ymin

Minimum y coordinate.

template<typename type>
type ork::box3< type >::zmax

Maximum z coordinate.

template<typename type>
type ork::box3< type >::zmin

Minimum z coordinate.


Generated on Mon Oct 18 09:36:07 2010 for ork by  doxygen 1.6.1