Public Member Functions | Protected Member Functions

Geom::PosRectangle< T > Class Template Reference

Floating-point rectangle class. More...

Inheritance diagram for Geom::PosRectangle< T >:
Geom::Rectangle< T >

List of all members.

Public Member Functions

 PosRectangle (T l=0, T t=0, T r=0, T b=0)
 PosRectangle (Point2D< T > tl, Point2D< T > br)
bool isOutside (const Point2D< T > &p, T eps) const
bool isInside (const Point2D< T > &, T eps) const
bool isOnSide (const Point2D< T > &p, T eps) const
bool contains (const Point2D< T > &p, T eps) const
bool contains (const PosRectangle< T > &other, T eps) const
bool isInside (const PosRectangle< T > &other, T eps) const
PosRectangle< T > grownBy (T sidesincreasebyfactor=1) const

Protected Member Functions

bool xOutside (T, T) const
bool yOutside (T, T) const

Detailed Description

template<class T>
class Geom::PosRectangle< T >

Floating-point rectangle class.

The difference with the integer type rectangle is in range handling. In the float world, everything must be epsiloned. with inside and outside.


Constructor & Destructor Documentation

template<class T>
Geom::PosRectangle< T >::PosRectangle ( l = 0,
t = 0,
r = 0,
b = 0 
) [inline]
template<class T>
Geom::PosRectangle< T >::PosRectangle ( Point2D< T >  tl,
Point2D< T >  br 
) [inline]

Member Function Documentation

template<class T>
bool Geom::PosRectangle< T >::contains ( const Point2D< T > &  p,
eps 
) const [inline]
template<class T>
bool Geom::PosRectangle< T >::contains ( const PosRectangle< T > &  other,
eps 
) const [inline]
template<class T >
PosRectangle< T > Geom::PosRectangle< T >::grownBy ( sidesincreasebyfactor = 1  )  const [inline]
template<class T >
bool Geom::PosRectangle< T >::isInside ( const Point2D< T > &  pt,
eps 
) const [inline]
template<class T>
bool Geom::PosRectangle< T >::isInside ( const PosRectangle< T > &  other,
eps 
) const [inline]
template<class T >
bool Geom::PosRectangle< T >::isOnSide ( const Point2D< T > &  p,
eps 
) const [inline]
template<class T>
bool Geom::PosRectangle< T >::isOutside ( const Point2D< T > &  p,
eps 
) const [inline]
template<class T >
bool Geom::PosRectangle< T >::xOutside ( x,
eps 
) const [inline, protected]
template<class T >
bool Geom::PosRectangle< T >::yOutside ( y,
eps 
) const [inline, protected]