IMP logo
Public Member Functions | Related Functions
IMP::algebra::BoundingBoxD< D > Class Template Reference

Detailed Description

template<int D>
class IMP::algebra::BoundingBoxD< D >

An axis-aligned bounding box.

The BoundingBoxD class provides a unified representation for bounding boxes in IMP. Geometric objects should have an associated namespace method like get_bounding_box() which returns the bounding boxes of objects.

Note:
This class is a geometric primitive.

Examples: range restriction, decay, cube, filter close pairs, merge tree, rigid collisions, dock with crosslinks, geometry, simulation, analyze convergence, rigid body and excluded volume restraint, nup84 cg, nup84 rb, optimize balls, basic geometry, incremental mc

List of all members.

Public Member Functions

 BoundingBoxD ()
 Create an empty bounding box.
 BoundingBoxD (unsigned int d)
 Create an empty bounding box.
 BoundingBoxD (const VectorD< D > &lb, const VectorD< D > &ub)
 Make from the lower and upper corners.
 BoundingBoxD (const VectorD< D > &v)
 Creating a bounding box containing one point.
 BoundingBoxD (const base::Vector< VectorD< D > > &points)
 Creating a bounding box from a set of points.
bool get_contains (const VectorD< D > &o) const
 True if the point o is contained within this bounding box.
bool get_contains (const BoundingBoxD &bb) const
 True if the input bounding box is contained within this bounding box.
const VectorD< D > & get_corner (unsigned int i) const
 For 0 return lower corner and 1 upper corner.
unsigned int get_dimension () const
template<class O >
const BoundingBoxD< D > operator+ (const BoundingBoxD< D > &o) const
 Returning a bounding box containing both.
template<class O >
const BoundingBoxD< D > operator+ (const O &o) const
 Return a bounding box grown by o on all sides.
const BoundingBoxD< D > & operator+= (const BoundingBoxD< D > &o)
 extend the current bounding box to include the other
const BoundingBoxD< D > & operator+= (const VectorD< D > &o)
 extend the current bounding box to include the point
const BoundingBoxD< D > & operator+= (double o)
void show (std::ostream &out=std::cout) const

Related Functions

(Note that these are not member functions.)

algebra::BoundingBoxD< 3 > get_bounding_box (const Hierarchy &h)
 Get a bounding box for the Hierarchy.

Constructor & Destructor Documentation

template<int D>
IMP::algebra::BoundingBoxD< D >::BoundingBoxD ( )

Create an empty bounding box.

template<int D>
IMP::algebra::BoundingBoxD< D >::BoundingBoxD ( unsigned int  d)
explicit

Create an empty bounding box.

template<int D>
IMP::algebra::BoundingBoxD< D >::BoundingBoxD ( const VectorD< D > &  lb,
const VectorD< D > &  ub 
)

Make from the lower and upper corners.

template<int D>
IMP::algebra::BoundingBoxD< D >::BoundingBoxD ( const VectorD< D > &  v)

Creating a bounding box containing one point.

template<int D>
IMP::algebra::BoundingBoxD< D >::BoundingBoxD ( const base::Vector< VectorD< D > > &  points)

Creating a bounding box from a set of points.


Member Function Documentation

template<int D>
bool IMP::algebra::BoundingBoxD< D >::get_contains ( const VectorD< D > &  o) const

True if the point o is contained within this bounding box.

template<int D>
bool IMP::algebra::BoundingBoxD< D >::get_contains ( const BoundingBoxD< D > &  bb) const

True if the input bounding box is contained within this bounding box.

template<int D>
const VectorD<D>& IMP::algebra::BoundingBoxD< D >::get_corner ( unsigned int  i) const

For 0 return lower corner and 1 upper corner.

template<int D>
template<class O >
const BoundingBoxD<D> IMP::algebra::BoundingBoxD< D >::operator+ ( const BoundingBoxD< D > &  o) const

Returning a bounding box containing both.

template<int D>
template<class O >
const BoundingBoxD<D> IMP::algebra::BoundingBoxD< D >::operator+ ( const O &  o) const

Return a bounding box grown by o on all sides.

template<int D>
const BoundingBoxD<D>& IMP::algebra::BoundingBoxD< D >::operator+= ( const BoundingBoxD< D > &  o)

extend the current bounding box to include the other

template<int D>
const BoundingBoxD<D>& IMP::algebra::BoundingBoxD< D >::operator+= ( const VectorD< D > &  o)

extend the current bounding box to include the point

template<int D>
const BoundingBoxD<D>& IMP::algebra::BoundingBoxD< D >::operator+= ( double  o)

Grow the bounding box by o on all sizes.


Friends And Related Function Documentation

template<int D>
algebra::BoundingBoxD< 3 > get_bounding_box ( const Hierarchy &  h)
related

Get a bounding box for the Hierarchy.

This bounding box is that of the highest (in the CS sense of a tree growing down from the root) cut through the tree where each node in the cut has x,y,z, and r. That is, if the root has x,y,z,r then it is the bounding box of that sphere. If only the leaves have radii, it is the bounding box of the leaves. If no such cut exists, the behavior is undefined.


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

Generated on Tue May 22 2012 23:33:24 for IMP by doxygen 1.8.1