OpendTect
6.6
|
Basic 2D rectangle class. More...
Public Member Functions | |
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) | |
T | bottom () const |
Point2D< T > | bottomLeft () const |
Point2D< T > | bottomRight () const |
Point2D< T > | centre () const |
bool | checkCorners (bool leftislow=true, bool topislow=true) const |
T | height () const |
void | include (const Point2D< T > &) |
void | include (const Rectangle< T > &) |
bool | isDefined () const |
T | 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 |
T | 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 () |
T | top () const |
Point2D< T > | topLeft () const |
Point2D< T > | topRight () const |
void | translate (const Point2D< T > &) |
T | width () const |
void | zero () |
Protected Attributes | |
Point2D< T > | bottomright_ |
Point2D< T > | topleft_ |
Basic 2D rectangle class.
This class is a bit more complicated than would be expected at first sight. This is caused by the problem of coordinate system sign. For example, in user interfaces, top is a lower number than bottom. But for normal coordinates, this is (of course) not the case. Still, also for floating point types, reverse axes are common.
<>
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022