Sirikata
Public Member Functions | Static Public Member Functions | Private Attributes
Sirikata::BoundingBox< real > Class Template Reference

#include <BoundingBox.hpp>

Collaboration diagram for Sirikata::BoundingBox< real >:

List of all members.

Public Member Functions

 BoundingBox ()
 BoundingBox (const Vector3< real > &center, float radius)
template<typename flt >
 BoundingBox (const BoundingBox< flt > &input)
 BoundingBox (const Vector3< real > &imin, const Vector3< real > &imax)
const Vector3< real > & min () const
const Vector3f & across () const
const Vector3f & diag () const
const Vector3f & extents () const
Vector3< real > max () const
Vector3< real > center () const
BoundingSphere< real > toBoundingSphere () const
BoundingBox< real > merge (const BoundingBox< real > &other)
BoundingBox merge (const Vector3< real > &other)
BoundingBoxmergeIn (const BoundingBox< real > &other)
BoundingBoxmergeIn (const Vector3< real > &other)
bool contains (const Vector3< real > &point, real eps=BBOX_CONTAINS_EPSILON) const
 Returns whether the point is within the bounding box, within the given epsilon.
bool degenerate () const
real volume () const
Vector3< real > clamp (const Vector3< real > &v) const
bool intersects (const BoundingBox &bbox2) const
bool operator== (const BoundingBox &rhs) const
bool operator!= (const BoundingBox &rhs) const

Static Public Member Functions

static BoundingBox< real > null ()

Private Attributes

Vector3< real > mMin
Vector3f mAcross

template<typename real>
class Sirikata::BoundingBox< real >


Constructor & Destructor Documentation

template<typename real>
Sirikata::BoundingBox< real >::BoundingBox ( ) [inline]
template<typename real>
Sirikata::BoundingBox< real >::BoundingBox ( const Vector3< real > &  center,
float  radius 
) [inline]
template<typename real>
template<typename flt >
Sirikata::BoundingBox< real >::BoundingBox ( const BoundingBox< flt > &  input) [inline]
template<typename real>
Sirikata::BoundingBox< real >::BoundingBox ( const Vector3< real > &  imin,
const Vector3< real > &  imax 
) [inline]

Member Function Documentation

template<typename real>
const Vector3f& Sirikata::BoundingBox< real >::across ( ) const [inline]
template<typename real>
Vector3<real> Sirikata::BoundingBox< real >::center ( ) const [inline]
template<typename real>
Vector3<real> Sirikata::BoundingBox< real >::clamp ( const Vector3< real > &  v) const [inline]
template<typename real>
bool Sirikata::BoundingBox< real >::contains ( const Vector3< real > &  point,
real  eps = BBOX_CONTAINS_EPSILON 
) const [inline]

Returns whether the point is within the bounding box, within the given epsilon.

A positive epsilon grows the bounding box, negative shrinks it.

Parameters:
pointThe point to test against the bounding box.
epsepsilon error, applied for all dimensions equally. Positive values increase the size of the bounding box, negative values decrease it.
Returns:
true if the point falls within epsilon inside the bounding box, false otherwise

References Sirikata::BoundingBox< real >::max(), and Sirikata::BoundingBox< real >::min().

template<typename real>
bool Sirikata::BoundingBox< real >::degenerate ( ) const [inline]
template<typename real>
const Vector3f& Sirikata::BoundingBox< real >::diag ( ) const [inline]
template<typename real>
const Vector3f& Sirikata::BoundingBox< real >::extents ( ) const [inline]
template<typename real>
bool Sirikata::BoundingBox< real >::intersects ( const BoundingBox< real > &  bbox2) const [inline]
template<typename real>
Vector3<real> Sirikata::BoundingBox< real >::max ( ) const [inline]
template<typename real>
BoundingBox<real> Sirikata::BoundingBox< real >::merge ( const BoundingBox< real > &  other) [inline]
template<typename real>
BoundingBox Sirikata::BoundingBox< real >::merge ( const Vector3< real > &  other) [inline]
template<typename real>
BoundingBox& Sirikata::BoundingBox< real >::mergeIn ( const BoundingBox< real > &  other) [inline]
template<typename real>
BoundingBox& Sirikata::BoundingBox< real >::mergeIn ( const Vector3< real > &  other) [inline]
template<typename real>
const Vector3<real>& Sirikata::BoundingBox< real >::min ( ) const [inline]
template<typename real>
static BoundingBox<real> Sirikata::BoundingBox< real >::null ( ) [inline, static]
template<typename real>
bool Sirikata::BoundingBox< real >::operator!= ( const BoundingBox< real > &  rhs) const [inline]
template<typename real>
bool Sirikata::BoundingBox< real >::operator== ( const BoundingBox< real > &  rhs) const [inline]
template<typename real>
BoundingSphere<real> Sirikata::BoundingBox< real >::toBoundingSphere ( ) const [inline]
template<typename real>
real Sirikata::BoundingBox< real >::volume ( ) const [inline]

Member Data Documentation

template<typename real>
Vector3f Sirikata::BoundingBox< real >::mAcross [private]
template<typename real>
Vector3<real> Sirikata::BoundingBox< real >::mMin [private]

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