IMP Reference Guide
2.22.0
The Integrative Modeling Platform
|
An axis-aligned bounding box. More...
#include <IMP/algebra/BoundingBoxD.h>
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.
Definition at line 28 of file BoundingBoxD.h.
Public Member Functions | |
BoundingBoxD () | |
Create an empty bounding box. More... | |
BoundingBoxD (unsigned int d) | |
Create an empty bounding box. More... | |
BoundingBoxD (const VectorD< D > &lb, const VectorD< D > &ub) | |
Make from the lower and upper corners. More... | |
BoundingBoxD (const VectorD< D > &v) | |
Creating a bounding box containing one point. More... | |
BoundingBoxD (const Vector< VectorD< D > > &points) | |
Creating a bounding box from a set of points. More... | |
bool | get_contains (const VectorD< D > &o) const |
True if the point o is contained within this bounding box. More... | |
bool | get_contains (const BoundingBoxD &bb) const |
True if the input bounding box is completely contained within this one. More... | |
const VectorD< D > & | get_corner (unsigned int i) const |
For 0 return lower corner and for 1, the upper corner. More... | |
unsigned int | get_dimension () const |
template<class O > | |
const BoundingBoxD< D > | operator+ (const BoundingBoxD< D > &o) const |
Returning a bounding box containing both. More... | |
template<class O > | |
const BoundingBoxD< D > | operator+ (const O &o) const |
Return a bounding box grown by o on all sides. More... | |
const BoundingBoxD< D > & | operator+= (const BoundingBoxD< D > &o) |
Extend the current bounding box to include the other. More... | |
const BoundingBoxD< D > & | operator+= (const VectorD< D > &o) |
Extend the current bounding box to include the point. More... | |
const BoundingBoxD< D > & | operator+= (double o) |
Grow the bounding box by o on all sizes. More... | |
void | show (std::ostream &out=std::cout) const |
IMP::algebra::BoundingBoxD< D >::BoundingBoxD | ( | ) |
Create an empty bounding box.
Definition at line 38 of file BoundingBoxD.h.
|
explicit |
Create an empty bounding box.
Definition at line 61 of file BoundingBoxD.h.
IMP::algebra::BoundingBoxD< D >::BoundingBoxD | ( | const VectorD< D > & | lb, |
const VectorD< D > & | ub | ||
) |
Make from the lower and upper corners.
Definition at line 73 of file BoundingBoxD.h.
|
explicit |
Creating a bounding box containing one point.
Definition at line 83 of file BoundingBoxD.h.
IMP::algebra::BoundingBoxD< D >::BoundingBoxD | ( | const Vector< VectorD< D > > & | points | ) |
Creating a bounding box from a set of points.
Definition at line 89 of file BoundingBoxD.h.
bool IMP::algebra::BoundingBoxD< D >::get_contains | ( | const VectorD< D > & | o | ) | const |
True if the point o is contained within this bounding box.
Definition at line 146 of file BoundingBoxD.h.
bool IMP::algebra::BoundingBoxD< D >::get_contains | ( | const BoundingBoxD< D > & | bb | ) | const |
True if the input bounding box is completely contained within this one.
Definition at line 153 of file BoundingBoxD.h.
const VectorD<D>& IMP::algebra::BoundingBoxD< D >::get_corner | ( | unsigned int | i | ) | const |
For 0 return lower corner and for 1, the upper corner.
Definition at line 140 of file BoundingBoxD.h.
const BoundingBoxD<D> IMP::algebra::BoundingBoxD< D >::operator+ | ( | const BoundingBoxD< D > & | o | ) | const |
Returning a bounding box containing both.
Definition at line 126 of file BoundingBoxD.h.
const BoundingBoxD<D> IMP::algebra::BoundingBoxD< D >::operator+ | ( | const O & | o | ) | const |
Return a bounding box grown by o on all sides.
Definition at line 133 of file BoundingBoxD.h.
const BoundingBoxD<D>& IMP::algebra::BoundingBoxD< D >::operator+= | ( | const BoundingBoxD< D > & | o | ) |
Extend the current bounding box to include the other.
Definition at line 99 of file BoundingBoxD.h.
const BoundingBoxD<D>& IMP::algebra::BoundingBoxD< D >::operator+= | ( | const VectorD< D > & | o | ) |
Extend the current bounding box to include the point.
Definition at line 108 of file BoundingBoxD.h.
const BoundingBoxD<D>& IMP::algebra::BoundingBoxD< D >::operator+= | ( | double | o | ) |
Grow the bounding box by o on all sizes.
Definition at line 117 of file BoundingBoxD.h.