![]() |
OpendTect 8.0
|
Class to provide coordinate conversion between a cartesian coordinate system (or any other transformed cartesian) and UI coordinate system(screen coordinate system.) More...
#include <uiworld2ui.h>
Public Member Functions | |
| uiWorld2Ui () | |
| uiWorld2Ui (const uiRect &, const uiWorldRect &) | |
| uiWorld2Ui (const uiSize &, const uiWorldRect &) | |
| uiWorld2Ui (const uiWorldRect &, const uiSize &) | |
| uiWorld2Ui (const World2UiData &) | |
| virtual | ~uiWorld2Ui () |
| void | getWorldXRange (float &xmin, float &xmax) const |
| void | getWorldYRange (float &ymin, float &ymax) const |
| uiWorld2Ui & | operator= (const uiWorld2Ui &) |
| bool | operator== (const uiWorld2Ui &) const |
| uiWorldPoint | origin () const |
| void | resetUiRect (const uiRect &) |
| void | set (const uiRect &rc, const SurveyInfo &) |
| void | set (const uiRect &rc, const uiWorldRect &) |
| void | set (const uiSize &sz, const uiWorldRect &) |
| void | set (const uiWorldRect &, const uiSize &) |
| void | set (const World2UiData &) |
| void | setCartesianRemap (const uiRect &, float minx, float maxx, float miny, float maxy) |
| void | setCartesianRemap (const uiSize &, float minx, float maxx, float miny, float maxy) |
| void | setRemap (const uiRect &, const uiWorldRect &) |
| void | setRemap (const uiSize &, const uiWorldRect &) |
| Quite useful for survey level maps. | |
| int | toUiX (float wrdx) const |
| int | toUiY (float wrdy) const |
| float | toWorldX (int uix) const |
| float | toWorldY (int uiy) const |
| void | transform (const Geom::Point2D< float > &, uiPoint &) const |
| template<class TT , class FT > | |
| Geom::Point2D< TT > | transform (const Geom::Point2D< FT > &, bool toworld) const |
| uiWorldPoint | transform (const uiPoint &) const |
| void | transform (const uiPoint &, Geom::Point2D< float > &) const |
| uiWorldRect | transform (const uiRect &) const |
| uiPoint | transform (const uiWorldPoint &) const |
| uiRect | transform (const uiWorldRect &) const |
| template<class TT , class FT > | |
| TT | transformX (FT x, bool toworld) const |
| template<class TT , class FT > | |
| TT | transformY (FT y, bool toworld) const |
| const World2UiData & | world2UiData () const |
| uiWorldPoint | worldPerPixel () const |
| numbers may be negative | |
Protected Attributes | |
| uiWorldPoint | fac_ |
| uiWorldPoint | p0_ |
| uiPoint | uiorigin_ |
| uiSize | uisize_ |
| World2UiData | w2ud_ |
| uiWorldRect | wrdrect_ |
| the world rect used for coord. conv. | |
Private Member Functions | |
| void | getAppropriateRange (float min, float max, float &newmin, float &newmax) |
Class to provide coordinate conversion between a cartesian coordinate system (or any other transformed cartesian) and UI coordinate system(screen coordinate system.)
Use the constructor or call set() to set up the two coordinate systems. 1) If the origin of UI is not at (0,0), use uiRect instead of uiSize to set up the UI coordinates. 2) In many cases the 'border' of world coordinate system is not at a good place, e.x. X ( 0.047 - 0.987 ). we would prefer to set it to an more appropriate range ( 0 - 1 ) and re-map this range to the UI window. This is done by calling setRemap() or setCartesianRemap(). The proper range is estimated by these functions and coordinate conversion will be based on the new world X/Y range.
<>
| uiWorld2Ui::uiWorld2Ui | ( | ) |
| uiWorld2Ui::uiWorld2Ui | ( | const uiSize & | , |
| const uiWorldRect & | ) |
| uiWorld2Ui::uiWorld2Ui | ( | const uiRect & | , |
| const uiWorldRect & | ) |
| uiWorld2Ui::uiWorld2Ui | ( | const uiWorldRect & | , |
| const uiSize & | ) |
| uiWorld2Ui::uiWorld2Ui | ( | const World2UiData & | ) |
|
virtual |
|
private |
| void uiWorld2Ui::getWorldXRange | ( | float & | xmin, |
| float & | xmax ) const |
If the world X/Y range has been re-calculated by calling setRemap() or setCartesianRemap(), call these two functions to get the new value
| void uiWorld2Ui::getWorldYRange | ( | float & | ymin, |
| float & | ymax ) const |
| uiWorld2Ui & uiWorld2Ui::operator= | ( | const uiWorld2Ui & | ) |
| bool uiWorld2Ui::operator== | ( | const uiWorld2Ui & | ) | const |
| uiWorldPoint uiWorld2Ui::origin | ( | ) | const |
| void uiWorld2Ui::resetUiRect | ( | const uiRect & | ) |
The following reset...() functions must be called ONLY AFTER a call to set...() is made.
| void uiWorld2Ui::set | ( | const uiRect & | rc, |
| const SurveyInfo & | ) |
| void uiWorld2Ui::set | ( | const uiRect & | rc, |
| const uiWorldRect & | ) |
| void uiWorld2Ui::set | ( | const uiSize & | sz, |
| const uiWorldRect & | ) |
| void uiWorld2Ui::set | ( | const uiWorldRect & | , |
| const uiSize & | ) |
| void uiWorld2Ui::set | ( | const World2UiData & | ) |
| void uiWorld2Ui::setCartesianRemap | ( | const uiRect & | , |
| float | minx, | ||
| float | maxx, | ||
| float | miny, | ||
| float | maxy ) |
| void uiWorld2Ui::setCartesianRemap | ( | const uiSize & | , |
| float | minx, | ||
| float | maxx, | ||
| float | miny, | ||
| float | maxy ) |
For most cases we are dealing with cartesian coord. system. Just pass the X/Y range to set up
| void uiWorld2Ui::setRemap | ( | const uiRect & | , |
| const uiWorldRect & | ) |
| void uiWorld2Ui::setRemap | ( | const uiSize & | , |
| const uiWorldRect & | ) |
Quite useful for survey level maps.
| int uiWorld2Ui::toUiX | ( | float | wrdx | ) | const |
| int uiWorld2Ui::toUiY | ( | float | wrdy | ) | const |
| float uiWorld2Ui::toWorldX | ( | int | uix | ) | const |
| float uiWorld2Ui::toWorldY | ( | int | uiy | ) | const |
| void uiWorld2Ui::transform | ( | const Geom::Point2D< float > & | , |
| uiPoint & | ) const |
| Geom::Point2D< TT > uiWorld2Ui::transform | ( | const Geom::Point2D< FT > & | ptin, |
| bool | toworld ) const |
| uiWorldPoint uiWorld2Ui::transform | ( | const uiPoint & | ) | const |
| void uiWorld2Ui::transform | ( | const uiPoint & | , |
| Geom::Point2D< float > & | ) const |
| uiWorldRect uiWorld2Ui::transform | ( | const uiRect & | ) | const |
| uiPoint uiWorld2Ui::transform | ( | const uiWorldPoint & | ) | const |
| uiRect uiWorld2Ui::transform | ( | const uiWorldRect & | ) | const |
| TT uiWorld2Ui::transformX | ( | FT | x, |
| bool | toworld ) const |
| TT uiWorld2Ui::transformY | ( | FT | y, |
| bool | toworld ) const |
| const World2UiData & uiWorld2Ui::world2UiData | ( | ) | const |
| uiWorldPoint uiWorld2Ui::worldPerPixel | ( | ) | const |
numbers may be negative
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
the world rect used for coord. conv.
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2025