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).
void bottomLeft (xy< T > p)
 Sets the bottom left corner (should only bee used for non-empty box).
xy< T > topRight () const
 Gives back the top right corner (if the bounding box is empty, then the return value is not defined).
void topRight (xy< T > p)
 Sets the top right corner (should only bee used for non-empty box).
xy< T > bottomRight () const
 Gives back the bottom right corner (if the bounding box is empty, then the return value is not defined).
void bottomRight (xy< T > p)
 Sets the bottom right corner (should only bee used for non-empty box).
xy< T > topLeft () const
 Gives back the top left corner (if the bounding box is empty, then the return value is not defined).
void topLeft (xy< T > p)
 Sets the top left corner (should only bee used for non-empty box).
bottom () const
 Gives back the bottom of the box (if the bounding box is empty, then the return value is not defined).
void bottom (T t)
 Sets the bottom of the box (should only bee used for non-empty box).
top () const
 Gives back the top of the box (if the bounding box is empty, then the return value is not defined).
void top (T t)
 Sets the top of the box (should only bee used for non-empty box).
left () const
 Gives back the left side of the box (if the bounding box is empty, then the return value is not defined).
void left (T t)
 Sets the left side of the box (should only bee used for non-empty box).
right () const
 Gives back the right side of the box (if the bounding box is empty, then the return value is not defined).
void right (T t)
 Sets the right side of the box (should only bee used for non-empty box).
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 Fri Feb 3 18:42:43 2006 for LEMON by  doxygen 1.4.6