Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

DBoundingBox Class Template Reference
[Datastructures]

#include <OpenMS/DATASTRUCTURES/DBoundingBox.h>

Inheritance diagram for DBoundingBox:

DIntervalBase

List of all members.


Detailed Description

template<UInt D>
class OpenMS::DBoundingBox< D >

A D-dimensional bounding box.

A DBoundingBox denotes a closed interval. Upper and lower margins are both contained.

Public Types

Type definitions
enum  { DIMENSION = D }
 Dimensions. More...
typedef
Internal::DIntervalBase< D > 
Base
 Base class type.
typedef Base::PositionType PositionType
 Position type.
typedef Base::CoordinateType CoordinateType
 Coordinate type of the positions.

Public Member Functions

Constructors and Destructor


 DBoundingBox ()
 Default constructor.
 DBoundingBox (const DBoundingBox &rhs)
 Copy constructor.
DBoundingBoxoperator= (const DBoundingBox &rhs)
 Assignement operator.
DBoundingBoxoperator= (const Base &rhs)
 Assignement operator for the base class.
 ~DBoundingBox ()
 Destructor.
 DBoundingBox (const PositionType &minimum, const PositionType &maximum)
 Constructor from two positions.
Accessors


void enlarge (const PositionType &p)
 Enlarges the bounding box such that it contains a position.
void enlarge (CoordinateType x, CoordinateType y)
 2D-version enlarge(x,y) is for convenience only
Predicates


bool operator== (const DBoundingBox &rhs) const
 Equality operator.
bool operator== (const Base &rhs) const
 Equality operator.
bool encloses (const PositionType &position) const
 Checks whether this range contains a certain point.
bool encloses (CoordinateType x, CoordinateType y) const
 2D-version encloses(x,y) is for convenience only
bool intersects (const DBoundingBox &bounding_box) const
bool isEmpty () const
 Test if bounding box is empty.

Related Functions

(Note that these are not member functions.)

template<UInt D>
std::ostream & operator<< (std::ostream &os, const DBoundingBox< D > &bounding_box)
 Print the contents to a stream.


Member Typedef Documentation

typedef Internal::DIntervalBase<D> Base

Base class type.

typedef Base::PositionType PositionType

Position type.

Reimplemented from DIntervalBase.

typedef Base::CoordinateType CoordinateType

Coordinate type of the positions.

Reimplemented from DIntervalBase.


Member Enumeration Documentation

anonymous enum

Dimensions.

Enumerator:
DIMENSION 


Constructor & Destructor Documentation

DBoundingBox (  )  [inline]

Default constructor.

DBoundingBox ( const DBoundingBox< D > &  rhs  )  [inline]

Copy constructor.

~DBoundingBox (  )  [inline]

Destructor.

DBoundingBox ( const PositionType minimum,
const PositionType maximum 
) [inline]

Constructor from two positions.


Member Function Documentation

DBoundingBox& operator= ( const DBoundingBox< D > &  rhs  )  [inline]

Assignement operator.

DBoundingBox& operator= ( const Base rhs  )  [inline]

Assignement operator for the base class.

void enlarge ( const PositionType p  )  [inline]

Enlarges the bounding box such that it contains a position.

void enlarge ( CoordinateType  x,
CoordinateType  y 
) [inline]

2D-version enlarge(x,y) is for convenience only

bool operator== ( const DBoundingBox< D > &  rhs  )  const [inline]

Equality operator.

bool operator== ( const Base rhs  )  const [inline]

Equality operator.

bool encloses ( const PositionType position  )  const [inline]

Checks whether this range contains a certain point.

Parameters:
position The point's position.
Returns:
true if point lies inside this area.

bool encloses ( CoordinateType  x,
CoordinateType  y 
) const [inline]

2D-version encloses(x,y) is for convenience only

bool intersects ( const DBoundingBox< D > &  bounding_box  )  const [inline]

Checks whether this bounding box intersects with another bounding box

bool isEmpty (  )  const [inline]

Test if bounding box is empty.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  os,
const DBoundingBox< D > &  bounding_box 
) [related]

Print the contents to a stream.


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:43 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1