OpendTect  7.0
Public Member Functions | Protected Member Functions | List of all members
Geom::PixRectangle< T > Class Template Reference

Integer rectangle class. More...

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

Public Member Functions

 PixRectangle (const Point2D< T > &tl, const Point2D< T > &br)
 
 PixRectangle (const Point2D< T > &tl, const Size2D< T > &sz)
 
 PixRectangle (const Rectangle< T > &)
 
 PixRectangle (T l=0, T t=0, T r=0, T b=0)
 
bool contains (const PixRectangle< T > &) const
 
bool contains (const Point2D< T > &) const
 
PixRectangle< T > grownBy (double sidesincreasebyfactor=1) const
 
bool isInside (const PixRectangle< T > &) const
 
bool isInside (const Point2D< T > &) const
 
bool isOnSide (const Point2D< T > &) const
 
bool isOutside (const Point2D< T > &) 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) const
 
bool yOutside (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::PixRectangle< T >

Integer rectangle class.

The difference with the floating point type rectangle is in range handling. In the float world, everything must be epsiloned. Integer rectangles are more straightforward.

<>

Constructor & Destructor Documentation

◆ PixRectangle() [1/4]

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

◆ PixRectangle() [2/4]

template<class T >
Geom::PixRectangle< T >::PixRectangle ( const Point2D< T > &  tl,
const Point2D< T > &  br 
)

◆ PixRectangle() [3/4]

template<class T >
Geom::PixRectangle< T >::PixRectangle ( const Point2D< T > &  tl,
const Size2D< T > &  sz 
)

◆ PixRectangle() [4/4]

template<class T >
Geom::PixRectangle< T >::PixRectangle ( const Rectangle< T > &  r)

Member Function Documentation

◆ contains() [1/2]

template<class T >
bool Geom::PixRectangle< T >::contains ( const PixRectangle< T > &  other) const
inline

◆ contains() [2/2]

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

◆ grownBy()

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

◆ isInside() [1/2]

template<class T >
bool Geom::PixRectangle< T >::isInside ( const PixRectangle< T > &  other) const
inline

◆ isInside() [2/2]

template<class T >
bool Geom::PixRectangle< T >::isInside ( const Point2D< T > &  p) const
inline

◆ isOnSide()

template<class T >
bool Geom::PixRectangle< T >::isOnSide ( const Point2D< T > &  pt) const
inline

◆ isOutside()

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

◆ xOutside()

template<class T >
bool Geom::PixRectangle< T >::xOutside ( x) const
inlineprotected

◆ yOutside()

template<class T >
bool Geom::PixRectangle< T >::yOutside ( y) const
inlineprotected

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