BBox< N, T > Class Template Reference

An axes-oriented bounding box in the specified dimension. More...

#include <BBox.h>

Inheritance diagram for BBox< N, T >:
Interval< N, T >

List of all members.

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.
BBoxoperator= (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.

Detailed Description

template<int N, typename T = double>
class BBox< N, T >

An axes-oriented bounding box in the specified dimension.

Parameters:
N is the dimension.
T is the number type. By default it is double.

Constructor & Destructor Documentation

template<int N, typename T = double>
BBox< N, T >::BBox ( const Number coordinates  )  [inline]

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.


Friends And Related Function Documentation

template<int N, typename T >
bool doOverlap ( const BBox< N, T > &  a,
const SemiOpenInterval< N, T > &  b 
) [related]

Return true if the domains overlap.

template<int N, typename T >
bool doOverlap ( const BBox< N, T > &  a,
const BBox< N, T > &  b 
) [related]

Return true if the bounding boxes overlap.

template<int N, typename T >
void printFormatted ( std::ostream &  out,
const BBox< N, T > &  x 
) [related]

Print in a nice format.

template<typename MultiIndexOutputIterator >
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.

Parameters:
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.
template<typename MultiIndexOutputIterator , typename T >
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.

Parameters:
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.
template<typename MultiIndexOutputIterator >
void scanConvert ( MultiIndexOutputIterator  indices,
const BBox< 3, int > &  box 
) [related]

Scan convert the index bounding box.

Parameters:
indices is an output iterator for multi-indices. The value type must be ads::FixedArray<3,int> assignable.
box describes the range of indices.
template<typename MultiIndexOutputIterator , typename T >
void scanConvert ( MultiIndexOutputIterator  indices,
const BBox< 3, T > &  box 
) [related]

Scan convert the index bounding box.

Parameters:
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.

The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:58 2016 for Computational Geometry Package by  doxygen 1.6.3