Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BoundingBox Class Template Reference
[Miscellaneous Tools]

#include <lemon/xy.h>

List of all members.


Detailed Description

template<typename T>
class lemon::BoundingBox< T >

A class to calculate or store the bounding box of plainvectors.

Author:
Attila Bernath


Public Member Functions

 BoundingBox ()
 Default constructor: creates an empty bounding box.
 BoundingBox (xy< T > a)
 Constructing the instance from one point.
bool empty () const
 Were any points added?
void clear ()
 Makes the BoundingBox empty.
xy< T > bottomLeft () const
 Gives back the bottom left corner (if the bounding box is empty, then the return value is not defined).
xy< T > topRight () const
 Gives back the top right corner (if the bounding box is empty, then the return value is not defined).
xy< T > bottomRight () const
 Gives back the bottom right corner (if the bounding box is empty, then the return value is not defined).
xy< T > topLeft () const
 Gives back the top left corner (if the bounding box is empty, then the return value is not defined).
bottom () const
 Gives back the bottom of the box (if the bounding box is empty, then the return value is not defined).
top () const
 Gives back the top of the box (if the bounding box is empty, then the return value is not defined).
left () const
 Gives back the left side of the box (if the bounding box is empty, then the return value is not defined).
right () const
 Gives back the right side of the box (if the bounding box is empty, then the return value is not defined).
height () const
 Gives back the height of the box (if the bounding box is empty, then the return value is not defined).
width () const
 Gives back the width of the box (if the bounding box is empty, then the return value is not defined).
bool inside (const xy< T > &u)
 Checks whether a point is inside a bounding box.
BoundingBoxadd (const xy< T > &u)
 Increments a bounding box with a point.
BoundingBoxadd (const BoundingBox &u)
 Increments a bounding box with an other bounding box.
BoundingBox operator+ (const BoundingBox &u)
 Sums two bounding boxes.
BoundingBox operator & (const BoundingBox &u)
 Intersection of two bounding boxes.


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:16:14 2005 for LEMON by  doxygen 1.4.4