A 3D bounding box. More...
#include <box3.h>
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. |
A 3D bounding box.
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.
ork::box3< type >::box3 | ( | const vec3< type > & | p, | |
const vec3< type > & | q | |||
) | [inline] |
Creates a new bounding box enclosing the two given points.
Casts this bounding box to another base type.
Returns the center of this bounding box.
Returns true if this bounding box contains the given point.
p | an arbitrary point. |
box3<type> ork::box3< type >::enlarge | ( | const box3< type > & | r | ) | const [inline] |
Returns the bounding box containing this box and the given box.
r | an arbitrary bounding box. |
box3<type> ork::box3< type >::enlarge | ( | const vec3< type > & | p | ) | const [inline] |
Returns the bounding box containing this box and the given point.
p | an arbitrary point. |