This class is used to transform coordinates in world coordinate system to the screen coordinate system. More...
Public Member Functions | |
| bool | isMirroring () |
| Returns TRUE if transformation is mirrored and FALSE otherwise. More... | |
| bool | isValid () |
| Returns TRUE if transformation is ok and FALSE otherwise. More... | |
| void | setMirroring (bool mirror) |
| Updates mirroring internal attribute. More... | |
Constructor and destructor methods. | |
Methods related to instantiation and destruction. | |
| WorldTransformer () | |
| Default constructor. More... | |
| WorldTransformer (const double &s1llx, const double &s1lly, const double &s1urx, const double &s1ury, double s2width, double s2height) | |
| Parameterized constructor. More... | |
| WorldTransformer (const te::gm::Envelope &system1Box, const te::gm::Envelope &system2Box) | |
| Parameterized constructor. More... | |
| WorldTransformer (const WorldTransformer &other) | |
| Copy constructor. More... | |
| ~WorldTransformer ()=default | |
| Destructor. More... | |
Transformation methods. | |
Methods used to change coordinates of a coordinate system to another. | |
| void | setTransformationParameters (const te::gm::Envelope &system1Box, const te::gm::Envelope &system2Box) |
| Updates the matrix of transformation to be used. More... | |
| void | system1Tosystem2 (double &wx, double &wy) const |
| Transforms the coordinate from world system to screen coordinate system. More... | |
| void | system1Tosystem2 (const double &wx, const double &wy, double &dx, double &dy) const |
| te::gm::Coord2D | system1Tosystem2 (const te::gm::Coord2D &c1) const |
| void | system2Tosystem1 (double &dx, double &dy) const |
| Transforms the coordinate from screen system to world coordinate system. More... | |
| void | system2Tosystem1 (double dx, double dy, double &wx, double &wy) const |
Getter methods of matrix parameters. | |
Methods used to retrieve informations about the matrix of transformation. | |
| double | getScaleX () |
| Returns the scale in X-axis. More... | |
| double | getScaleY () |
| Returns the scale in Y-axis. More... | |
| double | getTranslateX () |
| Returns the translation in X-axis. More... | |
| double | getTranslateY () |
| Returns the translation in Y-axis. More... | |
Getter parameters of the world box. | |
Methods used to retrieve informations about the box in world coordinate system. | |
| double | getS1llx () |
| Returns the lower left corner x value. More... | |
| double | getS1lly () |
| Returns the lower left corner y value. More... | |
| double | getS1urx () |
| Returns the upper right corner x value. More... | |
| double | getS1ury () |
| Returns the upper right corner y value. More... | |
| double | getS1Width () |
| Returns the width of the world box. More... | |
| double | getS1Height () |
| Returns the height of the world box. More... | |
Getter parameters of the device box. | |
Methods used to retrieve informations about the box in device coordinate system. | |
| double | getS2llx () |
| Returns the lower left corner x value. More... | |
| double | getS2lly () |
| Returns the lower left corner y value. More... | |
| double | getS2urx () |
| Returns the upper right corner x value. More... | |
| double | getS2ury () |
| Returns the upper right corner y value. More... | |
| double | getS2Width () |
| Returns the width of the device box. More... | |
| double | getS2Height () |
| Returns the height of the device box. More... | |
Protected Member Functions | |
| void | initVariables (const te::gm::Envelope &system1Box, const te::gm::Envelope &system2Box) |
| Initializes the transformer using the arguments. More... | |
Protected Attributes | |
| bool | m_mirroring {true} |
| Flag sinalizing the mirroring. More... | |
| double | m_s1Height {0.} |
| Height of System 1 coordinate system. More... | |
| double | m_s1llx {0.} |
| Lower left x-coordinate of the System 1. More... | |
| double | m_s1lly {0.} |
| Lower left y-coordinate of the System 1. More... | |
| double | m_s1urx {0.} |
| Upper right x-coordinate of the System 1. More... | |
| double | m_s1ury {0.} |
| Upper right y-coordinate of the System 1. More... | |
| double | m_s1Width {0.} |
| Width of System 1 coordinate system. More... | |
| double | m_s2Height {0.} |
| Height of System 2 coordinate system. More... | |
| double | m_s2llx {0.} |
| Lower left x-coordinate of the System 2. More... | |
| double | m_s2lly {0.} |
| Lower left y-coordinate of the System 2. More... | |
| double | m_s2urx {0.} |
| Upper right x-coordinate of the System 2. More... | |
| double | m_s2ury {0.} |
| Upper right y-coordinate of the System 2. More... | |
| double | m_s2Width {0.} |
| Width of System 2 coordinate system. More... | |
| double | m_scaleX {0.} |
| Map units per unit along x-direction between Coordinate Systems. More... | |
| double | m_scaleY {0.} |
| Map units per unit along y-direction between Coordinate Systems. More... | |
| double | m_translateX |
| The value corresponds to the X-Axis translation of system 2. More... | |
| double | m_translateY |
| The value corresponds to the Y-Axis translation of system 2. More... | |
| bool | m_valid {false} |
| Flag specifying the state of validation of the transformation being used. More... | |
This class is used to transform coordinates in world coordinate system to the screen coordinate system.
Definition at line 48 of file qt/widgets/canvas/Grid.cpp.
|
inline |
Default constructor.
Definition at line 60 of file qt/widgets/canvas/Grid.cpp.
|
inline |
Parameterized constructor.
Definition at line 68 of file qt/widgets/canvas/Grid.cpp.
References setTransformationParameters().
|
inline |
Parameterized constructor.
Definition at line 82 of file qt/widgets/canvas/Grid.cpp.
References setTransformationParameters().
|
inline |
Copy constructor.
| other | The object to be copied. |
Definition at line 93 of file qt/widgets/canvas/Grid.cpp.
References m_mirroring, m_s1Height, m_s1llx, m_s1lly, m_s1urx, m_s1ury, m_s1Width, m_s2Height, m_s2llx, m_s2lly, m_s2urx, m_s2ury, m_s2Width, m_scaleX, m_scaleY, m_translateX, m_translateY, m_valid, and ~WorldTransformer().
|
default |
Destructor.
Referenced by WorldTransformer().
|
inline |
Returns the height of the world box.
Definition at line 362 of file qt/widgets/canvas/Grid.cpp.
References m_s1Height.
|
inline |
Returns the lower left corner x value.
Definition at line 312 of file qt/widgets/canvas/Grid.cpp.
References m_s1llx.
|
inline |
Returns the lower left corner y value.
Definition at line 322 of file qt/widgets/canvas/Grid.cpp.
References m_s1lly.
|
inline |
Returns the upper right corner x value.
Definition at line 332 of file qt/widgets/canvas/Grid.cpp.
References m_s1urx.
|
inline |
Returns the upper right corner y value.
Definition at line 342 of file qt/widgets/canvas/Grid.cpp.
References m_s1ury.
|
inline |
Returns the width of the world box.
Definition at line 352 of file qt/widgets/canvas/Grid.cpp.
References m_s1Width.
|
inline |
Returns the height of the device box.
Definition at line 428 of file qt/widgets/canvas/Grid.cpp.
References m_s2Height.
|
inline |
Returns the lower left corner x value.
Definition at line 378 of file qt/widgets/canvas/Grid.cpp.
References m_s2llx.
|
inline |
Returns the lower left corner y value.
Definition at line 388 of file qt/widgets/canvas/Grid.cpp.
References m_s2lly.
|
inline |
Returns the upper right corner x value.
Definition at line 398 of file qt/widgets/canvas/Grid.cpp.
References m_s2urx.
|
inline |
Returns the upper right corner y value.
Definition at line 408 of file qt/widgets/canvas/Grid.cpp.
References m_s2ury.
|
inline |
Returns the width of the device box.
Definition at line 418 of file qt/widgets/canvas/Grid.cpp.
References m_s2Width.
|
inline |
Returns the scale in X-axis.
Definition at line 266 of file qt/widgets/canvas/Grid.cpp.
References m_scaleX.
|
inline |
Returns the scale in Y-axis.
Definition at line 276 of file qt/widgets/canvas/Grid.cpp.
References m_scaleY.
|
inline |
Returns the translation in X-axis.
Definition at line 286 of file qt/widgets/canvas/Grid.cpp.
References m_translateX.
|
inline |
Returns the translation in Y-axis.
Definition at line 296 of file qt/widgets/canvas/Grid.cpp.
References m_translateY.
|
inlineprotected |
Initializes the transformer using the arguments.
| system1Box | Box in world coordinate system. |
| system2Box | Box in device coordinate system. |
Definition at line 476 of file qt/widgets/canvas/Grid.cpp.
References te::gm::Envelope::getHeight(), te::gm::Envelope::getLowerLeftX(), te::gm::Envelope::getLowerLeftY(), te::gm::Envelope::getUpperRightX(), te::gm::Envelope::getUpperRightY(), te::gm::Envelope::getWidth(), m_s1Height, m_s1llx, m_s1lly, m_s1urx, m_s1ury, m_s1Width, m_s2Height, m_s2llx, m_s2lly, m_s2urx, m_s2ury, m_s2Width, m_scaleX, m_scaleY, m_translateX, and m_translateY.
Referenced by setTransformationParameters().
|
inline |
Returns TRUE if transformation is mirrored and FALSE otherwise.
Definition at line 452 of file qt/widgets/canvas/Grid.cpp.
References m_mirroring.
|
inline |
Returns TRUE if transformation is ok and FALSE otherwise.
Definition at line 439 of file qt/widgets/canvas/Grid.cpp.
|
inline |
Updates mirroring internal attribute.
| mirror | New mirroring state. |
Definition at line 462 of file qt/widgets/canvas/Grid.cpp.
References m_mirroring.
Referenced by CalculateHorizontalLines(), CalculateVerticalLines(), and te::qt::widgets::Grid::redraw().
|
inline |
Updates the matrix of transformation to be used.
| system1Box | Box in world coordinate system. |
| system2Box | Box in screen coordinate system. |
Definition at line 133 of file qt/widgets/canvas/Grid.cpp.
References initVariables(), te::gm::Envelope::isValid(), m_s1Height, m_s1llx, m_s1lly, m_s1Width, m_s2Height, m_s2llx, m_s2lly, m_s2Width, m_scaleX, m_scaleY, m_translateX, m_translateY, and m_valid.
Referenced by GetTransformGeo(), and WorldTransformer().
|
inline |
Transforms the coordinate from world system to screen coordinate system.
| [out] | wx | Coordinate in X-axis. |
| [out] | wy | Coordinate in Y-axis. |
Definition at line 158 of file qt/widgets/canvas/Grid.cpp.
References m_mirroring, m_s2Height, m_scaleX, m_scaleY, m_translateX, and m_translateY.
Referenced by ConvertToMillimeter(), DrawLines(), GetTextsPixmap(), and system1Tosystem2().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| wx | Coordinate, in X-axis, to be transformed to screen coordinate system. | |
| wy | Coordinate, in Y-axis, to be transformed to screen coordinate system. | |
| [out] | dx | Coodinate, in X-axis, transformed. |
| [out] | dy | Coodinate, in Y-axis, transformed. |
Definition at line 181 of file qt/widgets/canvas/Grid.cpp.
References m_mirroring, m_s2Height, m_scaleX, m_scaleY, m_translateX, and m_translateY.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| c1 | Coordinate to be transformed. |
Definition at line 200 of file qt/widgets/canvas/Grid.cpp.
References te::gm::Coord2D::getX(), te::gm::Coord2D::getY(), and system1Tosystem2().
|
inline |
Transforms the coordinate from screen system to world coordinate system.
| [out] | dx | Coordinate in X-axis. |
| [out] | dy | Coordinate in Y-axis. |
Definition at line 218 of file qt/widgets/canvas/Grid.cpp.
References m_mirroring, m_s2Height, m_scaleX, m_scaleY, m_translateX, and m_translateY.
Referenced by GetGeographicCoordLine(), and GetTextsPixmap().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| dx | Coordinate, in X-axis, to be transformed to world coordinate system. | |
| dy | Coordinate, in Y-axis, to be transformed to world coordinate system. | |
| [out] | wx | Coodinate, in X-axis, transformed. |
| [out] | wy | Coodinate, in Y-axis, transformed. |
Definition at line 242 of file qt/widgets/canvas/Grid.cpp.
References m_mirroring, m_s2Height, m_scaleX, m_scaleY, m_translateX, and m_translateY.
|
protected |
Flag sinalizing the mirroring.
Definition at line 521 of file qt/widgets/canvas/Grid.cpp.
Referenced by isMirroring(), setMirroring(), system1Tosystem2(), system2Tosystem1(), and WorldTransformer().
|
protected |
Height of System 1 coordinate system.
Definition at line 512 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS1Height(), initVariables(), setTransformationParameters(), and WorldTransformer().
|
protected |
Lower left x-coordinate of the System 1.
Definition at line 507 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS1llx(), initVariables(), setTransformationParameters(), and WorldTransformer().
|
protected |
Lower left y-coordinate of the System 1.
Definition at line 508 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS1lly(), initVariables(), setTransformationParameters(), and WorldTransformer().
|
protected |
Upper right x-coordinate of the System 1.
Definition at line 509 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS1urx(), initVariables(), and WorldTransformer().
|
protected |
Upper right y-coordinate of the System 1.
Definition at line 510 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS1ury(), initVariables(), and WorldTransformer().
|
protected |
Width of System 1 coordinate system.
Definition at line 511 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS1Width(), initVariables(), setTransformationParameters(), and WorldTransformer().
|
protected |
Height of System 2 coordinate system.
Definition at line 518 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS2Height(), initVariables(), setTransformationParameters(), system1Tosystem2(), system2Tosystem1(), and WorldTransformer().
|
protected |
Lower left x-coordinate of the System 2.
Definition at line 513 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS2llx(), initVariables(), setTransformationParameters(), and WorldTransformer().
|
protected |
Lower left y-coordinate of the System 2.
Definition at line 514 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS2lly(), initVariables(), setTransformationParameters(), and WorldTransformer().
|
protected |
Upper right x-coordinate of the System 2.
Definition at line 515 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS2urx(), initVariables(), and WorldTransformer().
|
protected |
Upper right y-coordinate of the System 2.
Definition at line 516 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS2ury(), initVariables(), and WorldTransformer().
|
protected |
Width of System 2 coordinate system.
Definition at line 517 of file qt/widgets/canvas/Grid.cpp.
Referenced by getS2Width(), initVariables(), setTransformationParameters(), and WorldTransformer().
|
protected |
Map units per unit along x-direction between Coordinate Systems.
Definition at line 499 of file qt/widgets/canvas/Grid.cpp.
Referenced by getScaleX(), initVariables(), isValid(), setTransformationParameters(), system1Tosystem2(), system2Tosystem1(), and WorldTransformer().
|
protected |
Map units per unit along y-direction between Coordinate Systems.
Definition at line 501 of file qt/widgets/canvas/Grid.cpp.
Referenced by getScaleY(), initVariables(), isValid(), setTransformationParameters(), system1Tosystem2(), system2Tosystem1(), and WorldTransformer().
|
protected |
The value corresponds to the X-Axis translation of system 2.
Definition at line 503 of file qt/widgets/canvas/Grid.cpp.
Referenced by getTranslateX(), initVariables(), setTransformationParameters(), system1Tosystem2(), system2Tosystem1(), and WorldTransformer().
|
protected |
The value corresponds to the Y-Axis translation of system 2.
Definition at line 505 of file qt/widgets/canvas/Grid.cpp.
Referenced by getTranslateY(), initVariables(), setTransformationParameters(), system1Tosystem2(), system2Tosystem1(), and WorldTransformer().
|
protected |
Flag specifying the state of validation of the transformation being used.
Definition at line 519 of file qt/widgets/canvas/Grid.cpp.
Referenced by setTransformationParameters(), and WorldTransformer().