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

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 > bottomright_
 
Point2D< T > topleft_
 

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

◆ PosRectangle() [1/2]

template<class T >
Geom::PosRectangle< T >::PosRectangle ( l = 0,
t = 0,
r = 0,
b = 0 
)
inline

◆ PosRectangle() [2/2]

template<class T >
Geom::PosRectangle< T >::PosRectangle ( Point2D< T >  tl,
Point2D< T >  br 
)
inline

Member Function Documentation

◆ contains() [1/2]

template<class T >
bool Geom::PosRectangle< T >::contains ( const Point2D< T > &  p,
eps 
) const
inline

◆ contains() [2/2]

template<class T >
bool Geom::PosRectangle< T >::contains ( const PosRectangle< T > &  other,
eps 
) const
inline

◆ grownBy()

template<class T >
PosRectangle< T > Geom::PosRectangle< T >::grownBy ( sidesincreasebyfactor = 1) const
inline

◆ isInside() [1/2]

template<class T >
bool Geom::PosRectangle< T >::isInside ( const Point2D< T > &  pt,
eps 
) const
inline

◆ isInside() [2/2]

template<class T >
bool Geom::PosRectangle< T >::isInside ( const PosRectangle< T > &  other,
eps 
) const
inline

◆ isOnSide()

template<class T >
bool Geom::PosRectangle< T >::isOnSide ( const Point2D< T > &  p,
eps 
) const
inline

◆ isOutside()

template<class T >
bool Geom::PosRectangle< T >::isOutside ( const Point2D< T > &  p,
eps 
) const
inline

◆ scale()

template<class T >
template<class TT >
PosRectangle< T > Geom::PosRectangle< T >::scale ( TT  xx,
TT  yy 
) const
inline

◆ xOutside()

template<class T >
bool Geom::PosRectangle< T >::xOutside ( x,
eps 
) const
inlineprotected

◆ yOutside()

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. 1995-2022