OpendTect-6_4  6.4
Public Member Functions | Protected Member Functions | List of all members
Geom::PosRectangle< T > Class Template Reference

Floating-point rectangle class. More...

Inheritance diagram for Geom::PosRectangle< T >:
[legend]

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
 
- Public Member Functions inherited from Geom::Rectangle< T >
 Rectangle (T l=0, T t=0, T r=0, T b=0)
 
 Rectangle (const Point2D< T > &tl, const Point2D< T > &br)
 
 Rectangle (const Point2D< T > &tl, const Size2D< T > &sz)
 
bool operator== (const Rectangle< T > &) const
 
bool operator!= (const Rectangle< T > &) const
 
Point2D< T > topLeft () const
 
Point2D< T > topRight () const
 
Point2D< T > bottomLeft () const
 
Point2D< T > bottomRight () const
 
Point2D< T > centre () const
 
void setTopLeft (Point2D< T >)
 
void setBottomRight (Point2D< T >)
 
void setTopRight (Point2D< T >)
 
void setBottomLeft (Point2D< T >)
 
void setTopBottom (const Interval< T > &)
 
void setLeftRight (const Interval< T > &)
 
Point2D< T > moveInside (const Point2D< T > &) const
 
void include (const Rectangle< T > &)
 
void include (const Point2D< T > &)
 
void limitTo (const Rectangle< T > &)
 
void translate (const Point2D< T > &)
 
bool operator> (const Rectangle< T > &) const
 
width () const
 
height () const
 
left () const
 
top () const
 
right () const
 
bottom () const
 
void setLeft (T val)
 
void setTop (T val)
 
void setRight (T val)
 
void setBottom (T val)
 
bool checkCorners (bool leftislow=true, bool topislow=true) const
 
void sortCorners (bool leftislow=true, bool topislow=true)
 
Size2D< T > size () const
 
void zero ()
 
bool isDefined () const
 
Rectangle< T > & operator+= (const Point2D< T > &)
 
Rectangle< T > & operator-= (const Point2D< T > &)
 
Rectangle< T > & operator+= (const Size2D< T > &)
 
Rectangle< T > & operator-= (const Size2D< T > &)
 
void swapHor ()
 
void swapVer ()
 
bool revX () const
 
bool revY () const
 

Protected Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from Geom::Rectangle< T >
Point2D< T > topleft_
 
Point2D< T > bottomright_
 

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
inlineprotected
template<class T>
bool Geom::PosRectangle< T >::yOutside ( y,
eps 
) const
inlineprotected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019