An axes-oriented bounding box in the specified dimension. More...
#include <BBox.h>
Public Types | |
typedef T | Number |
The number type. | |
typedef Base::Point | Point |
The point type. | |
Public Member Functions | |
Constructors etc. | |
BBox () | |
Default constructor. | |
BBox (const Point &min, const Point &max) | |
Construct a bounding box from the min and max points. | |
BBox (const Number xmin, const Number xmax) | |
Construct a 1-D bounding box from the min and max coordinates. | |
BBox (const Number xmin, const Number ymin, const Number xmax, const Number ymax) | |
Construct an 2-D bounding box from the min and max coordinates. | |
BBox (const Number xmin, const Number ymin, const Number zmin, const Number xmax, const Number ymax, const Number zmax) | |
Construct a 3-D bounding box from the min and max coordinates. | |
BBox (const Number *coordinates) | |
Construct a bounding box from an array of the min and max coordinates. | |
BBox (const BBox &other) | |
Copy Constructor. | |
BBox (const Interval< N, T > &x) | |
Constructor from an interval. | |
BBox & | operator= (const BBox &other) |
Assignment operator. | |
~BBox () | |
Trivial destructor. No need for virtual. | |
Mathematical functions. | |
bool | isEmpty () const |
Return true if the BBox is empty. | |
template<typename PointType > | |
bool | isIn (const PointType &p) const |
Return true if the point is in this bounding box. | |
bool | isIn (const BBox &x) const |
Return true if the bounding box x is in this bounding box. | |
bool | isIn (const SemiOpenInterval< N, T > &x) const |
Return true if the semi-open interval x is in this bounding box. | |
Related Functions | |
(Note that these are not member functions.) | |
template<int N, typename T > | |
void | printFormatted (std::ostream &out, const BBox< N, T > &x) |
Print in a nice format. | |
template<int N, typename T > | |
bool | doOverlap (const BBox< N, T > &a, const BBox< N, T > &b) |
Return true if the bounding boxes overlap. | |
template<int N, typename T > | |
bool | doOverlap (const BBox< N, T > &a, const SemiOpenInterval< N, T > &b) |
Return true if the domains overlap. | |
template<typename MultiIndexOutputIterator , typename T > | |
void | scanConvert (MultiIndexOutputIterator indices, const BBox< 3, T > &box) |
Scan convert the index bounding box. | |
template<typename MultiIndexOutputIterator > | |
void | scanConvert (MultiIndexOutputIterator indices, const BBox< 3, int > &box) |
Scan convert the index bounding box. | |
template<typename MultiIndexOutputIterator , typename T > | |
void | scanConvert (MultiIndexOutputIterator indices, const BBox< 3, T > &box, const BBox< 3, int > &domain) |
Scan convert the index bounding box on the specified index domain. | |
template<typename MultiIndexOutputIterator > | |
void | scanConvert (MultiIndexOutputIterator indices, const BBox< 3, int > &box, const BBox< 3, int > &domain) |
Scan convert the index bounding box on the specified index domain. |
An axes-oriented bounding box in the specified dimension.
N | is the dimension. | |
T | is the number type. By default it is double. |
Construct a bounding box from an array of the min and max coordinates.
The coordinates should be in the same order as for the above constructors.
bool doOverlap | ( | const BBox< N, T > & | a, | |
const SemiOpenInterval< N, T > & | b | |||
) | [related] |
Return true if the domains overlap.
bool doOverlap | ( | const BBox< N, T > & | a, | |
const BBox< N, T > & | b | |||
) | [related] |
Return true if the bounding boxes overlap.
void printFormatted | ( | std::ostream & | out, | |
const BBox< N, T > & | x | |||
) | [related] |
Print in a nice format.
void scanConvert | ( | MultiIndexOutputIterator | indices, | |
const BBox< 3, int > & | box, | |||
const BBox< 3, int > & | domain | |||
) | [related] |
Scan convert the index bounding box on the specified index domain.
indices | is an output iterator for multi-indices. The value type must be ads::FixedArray<3,int> assignable. | |
box | is the closed range of indices. | |
domain | is the closed range of indices on which to perform the scan conversion. |
void scanConvert | ( | MultiIndexOutputIterator | indices, | |
const BBox< 3, T > & | box, | |||
const BBox< 3, int > & | domain | |||
) | [related] |
Scan convert the index bounding box on the specified index domain.
indices | is an output iterator for multi-indices. The value type must be ads::FixedArray<3,int> assignable. | |
box | describes the range of indices. It is a bounding box of some floating point number type. This box will be converted to an integer bounding box. Then the below scan conversion function is used. | |
domain | is the closed range of indices on which to perform the scan conversion. |
void scanConvert | ( | MultiIndexOutputIterator | indices, | |
const BBox< 3, int > & | box | |||
) | [related] |
Scan convert the index bounding box.
indices | is an output iterator for multi-indices. The value type must be ads::FixedArray<3,int> assignable. | |
box | describes the range of indices. |
void scanConvert | ( | MultiIndexOutputIterator | indices, | |
const BBox< 3, T > & | box | |||
) | [related] |
Scan convert the index bounding box.
indices | is an output iterator for multi-indices. The value type must be ads::FixedArray<3,int> assignable. | |
box | describes the range of indices. It is a bounding box of some floating point number type. This box will be converted to an integer bounding box. Then the below scan conversion function is used. |