BoundingBox Class Template Reference
[Miscellaneous Tools]

#include <lemon/dim2.h>

List of all members.


Detailed Description

template<typename T>
class lemon::dim2::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 (Point< T > a)
 Construct an instance from one point.
bool empty () const
 Were any points added?
void clear ()
 Make the BoundingBox empty.
Point< T > bottomLeft () const
 Give back the bottom left corner.
void bottomLeft (Point< T > p)
 Set the bottom left corner.
Point< T > topRight () const
 Give back the top right corner.
void topRight (Point< T > p)
 Set the top right corner.
Point< T > bottomRight () const
 Give back the bottom right corner.
void bottomRight (Point< T > p)
 Set the bottom right corner.
Point< T > topLeft () const
 Give back the top left corner.
void topLeft (Point< T > p)
 Set the top left corner.
bottom () const
 Give back the bottom of the box.
void bottom (T t)
 Set the bottom of the box.
top () const
 Give back the top of the box.
void top (T t)
 Set the top of the box.
left () const
 Give back the left side of the box.
void left (T t)
 Set the left side of the box.
right () const
 Give back the right side of the box.
void right (T t)
 Set the right side of the box.
height () const
 Give back the height of the box.
width () const
 Give back the width of the box.
bool inside (const Point< T > &u)
 Checks whether a point is inside a bounding box.
BoundingBoxadd (const Point< T > &u)
 Increments a bounding box with a point.
BoundingBoxadd (const BoundingBox &u)
 Increments a bounding to contain another bounding box.
BoundingBox operator & (const BoundingBox &u)
 Intersection of two bounding boxes.


Member Function Documentation

Point<T> bottomLeft (  )  const [inline]

Give back the bottom left corner. If the bounding box is empty, then the return value is not defined.

void bottomLeft ( Point< T >  p  )  [inline]

Set the bottom left corner. It should only bee used for non-empty box.

Point<T> topRight (  )  const [inline]

Give back the top right corner. If the bounding box is empty, then the return value is not defined.

void topRight ( Point< T >  p  )  [inline]

Set the top right corner. It should only bee used for non-empty box.

Point<T> bottomRight (  )  const [inline]

Give back the bottom right corner. If the bounding box is empty, then the return value is not defined.

void bottomRight ( Point< T >  p  )  [inline]

Set the bottom right corner. It should only bee used for non-empty box.

Point<T> topLeft (  )  const [inline]

Give back the top left corner. If the bounding box is empty, then the return value is not defined.

void topLeft ( Point< T >  p  )  [inline]

Set the top left corner. It should only bee used for non-empty box.

T bottom (  )  const [inline]

Give back the bottom of the box. If the bounding box is empty, then the return value is not defined.

void bottom ( t  )  [inline]

Set the bottom of the box. It should only bee used for non-empty box.

T top (  )  const [inline]

Give back the top of the box. If the bounding box is empty, then the return value is not defined.

void top ( t  )  [inline]

Set the top of the box. It should only bee used for non-empty box.

T left (  )  const [inline]

Give back the left side of the box. If the bounding box is empty, then the return value is not defined.

void left ( t  )  [inline]

Set the left side of the box. It should only bee used for non-empty box

T right (  )  const [inline]

Give back the right side of the box. If the bounding box is empty, then the return value is not defined.

void right ( t  )  [inline]

Set the right side of the box. It should only bee used for non-empty box

T height (  )  const [inline]

Give back the height of the box. If the bounding box is empty, then the return value is not defined.

T width (  )  const [inline]

Give back the width of the box. If the bounding box is empty, then the return value is not defined.


The documentation for this class was generated from the following file:
Generated on Tue Oct 31 09:51:51 2006 for LEMON by  doxygen 1.5.1