This class implements the logic for transforming from device coordinate to world coordinate and vice-versa. More...
#include <WorldDeviceTransformer.h>
| Public Member Functions | |
| Initializer Methods | |
| Methods related to instantiation and destruction. | |
| WorldDeviceTransformer () | |
| Empty constructor.  More... | |
| WorldDeviceTransformer (const double &wllx, const double &wlly, const double &wurx, const double &wury, int deviceWidth, int deviceHeight) | |
| Creates a new transformation functor that maps between the spatial coordinate system of a feature to device (canvas) coordinate system.  More... | |
| ~WorldDeviceTransformer () | |
| Destructor.  More... | |
| Transformation Methods | |
| Methods used to transform coordinates from world (feature coordinate system) to device (canvas) and vice-versa. | |
| double | m_mapUnitsPP | 
| Map units per-pixel.  More... | |
| double | m_wllx | 
| Lower left x-coordinate of the World (Spatial Coordinate System of the features).  More... | |
| double | m_wlly | 
| Lower left y-coordinate of the World (Spatial Coordinate System of the features).  More... | |
| double | m_wurx | 
| Upper right x-coordinate of the World (Spatial Coordinate System of the features).  More... | |
| double | m_wury | 
| Upper right y-coordinate of the World (Spatial Coordinate System of the features).  More... | |
| void | setTransformationParameters (const double &wllx, const double &wlly, const double &wurx, const double &wury, int deviceWidth, int deviceHeight) | 
| It adjusts a new transformation function that maps between the spatial coordinate system of a feature to device (canvas) coordinate system.  More... | |
| void | world2Device (double &wx, double &wy) const | 
| It transforms the coordinate wx and wy from world coordinates to device (canvas) coordinates without using auxiliary variables. It is supposed to be faster than the other version that has 4 parameters.  More... | |
| void | world2Device (double *line, unsigned int npoints, double *pts) | 
| It transforms the line coordinates from world coordinates to device (canvas) coordinates.  More... | |
| void | world2Device (const double &wx, const double &wy, double &dx, double &dy) const | 
| It transforms the coordinate wx and wy from world coordinates to device (canvas) coordinates (dx and dy).  More... | |
| void | device2World (double &dx, double &dy) const | 
| It transforms the coordinate dx and dy from device coordinates to world coordinates without using auxiliary variables. It is supposed to be faster than the other version that has 4 parameters.  More... | |
| void | device2World (int dx, int dy, double &wx, double &wy) const | 
| It transforms the coordinate dx and dy from device (canvas) coordinates to world coordinates (wx and wy).  More... | |
| double | device2World (int delta) | 
| It transforms a delta value (pixels) from device to world value (value in current unit).  More... | |
| int | world2Device (double delta) | 
| It transforms a world delta value (value in current unit) to a pixel unit.  More... | |
This class implements the logic for transforming from device coordinate to world coordinate and vice-versa.
Definition at line 44 of file WorldDeviceTransformer.h.
| 
 | inline | 
Empty constructor.
Definition at line 174 of file WorldDeviceTransformer.h.
| 
 | inline | 
Creates a new transformation functor that maps between the spatial coordinate system of a feature to device (canvas) coordinate system.
| wllx | Lower left x-coordinate of the World (Spatial Coordinate System of the features). | 
| wlly | Lower left y-coordinate of the World (Spatial Coordinate System of the features). | 
| wurx | Upper right x-coordinate of the World (Spatial Coordinate System of the features). | 
| wury | Upper right y-coordinate of the World (Spatial Coordinate System of the features). | 
| deviceWidth | Device (canvas) width in pixels. | 
| deviceHeight | Device (canvas) height in pixels. | 
Definition at line 183 of file WorldDeviceTransformer.h.
References setTransformationParameters().
| 
 | inline | 
Destructor.
Definition at line 190 of file WorldDeviceTransformer.h.
| 
 | inline | 
It transforms the coordinate dx and dy from device coordinates to world coordinates without using auxiliary variables. It is supposed to be faster than the other version that has 4 parameters.
| dx | X value in device coordinates. | 
| dy | Y value in device coordinates. | 
Definition at line 249 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, and m_wury.
| 
 | inline | 
It transforms a delta value (pixels) from device to world value (value in current unit).
| delta | A value in pixel unit from devide | 
Definition at line 262 of file WorldDeviceTransformer.h.
References m_mapUnitsPP.
| 
 | inline | 
It transforms the coordinate dx and dy from device (canvas) coordinates to world coordinates (wx and wy).
| dx | X value in device coordinates. | 
| dy | Y value in device coordinates. | 
| wx | X value in world coordinates. | 
| wy | Y value in world coordinates. | 
Definition at line 255 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, and m_wury.
| 
 | inline | 
It adjusts a new transformation function that maps between the spatial coordinate system of a feature to device (canvas) coordinate system.
| wllx | Lower left x-coordinate of the World (Spatial Coordinate System of the features). | 
| wlly | Lower left y-coordinate of the World (Spatial Coordinate System of the features). | 
| wurx | Upper right x-coordinate of the World (Spatial Coordinate System of the features). | 
| wury | Upper right y-coordinate of the World (Spatial Coordinate System of the features). | 
| deviceWidth | Device (canvas) width in pixels. | 
| deviceHeight | Device (canvas) height in pixels. | 
Definition at line 194 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, m_wlly, m_wurx, and m_wury.
Referenced by WorldDeviceTransformer().
| 
 | inline | 
It transforms the coordinate wx and wy from world coordinates to device (canvas) coordinates (dx and dy).
| wx | X value in world coordinates. | 
| wy | Y value in world coordinates. | 
| dx | X value in device coordinates. | 
| dy | Y value in device coordinates. | 
Definition at line 242 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, and m_wury.
| 
 | inline | 
It transforms the coordinate wx and wy from world coordinates to device (canvas) coordinates without using auxiliary variables. It is supposed to be faster than the other version that has 4 parameters.
| wx | X value in world coordinates. | 
| wy | Y value in world coordinates. | 
Definition at line 225 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, and m_wury.
| 
 | inline | 
It transforms the line coordinates from world coordinates to device (canvas) coordinates.
| line | Must be a buffer of double, with npoints. | 
| npoints | The number of points in the line. | 
| pts | The device coordinate buffer. | 
Definition at line 231 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, and m_wury.
| 
 | inline | 
It transforms a world delta value (value in current unit) to a pixel unit.
| delta | Value in current unit from canvas projection | 
Definition at line 267 of file WorldDeviceTransformer.h.
References m_mapUnitsPP.
| double te::map::WorldDeviceTransformer::m_mapUnitsPP | 
Map units per-pixel.
Definition at line 167 of file WorldDeviceTransformer.h.
Referenced by device2World(), setTransformationParameters(), and world2Device().
| double te::map::WorldDeviceTransformer::m_wllx | 
Lower left x-coordinate of the World (Spatial Coordinate System of the features).
Definition at line 168 of file WorldDeviceTransformer.h.
Referenced by device2World(), setTransformationParameters(), and world2Device().
| double te::map::WorldDeviceTransformer::m_wlly | 
Lower left y-coordinate of the World (Spatial Coordinate System of the features).
Definition at line 169 of file WorldDeviceTransformer.h.
Referenced by setTransformationParameters().
| double te::map::WorldDeviceTransformer::m_wurx | 
Upper right x-coordinate of the World (Spatial Coordinate System of the features).
Definition at line 170 of file WorldDeviceTransformer.h.
Referenced by setTransformationParameters().
| double te::map::WorldDeviceTransformer::m_wury | 
Upper right y-coordinate of the World (Spatial Coordinate System of the features).
Definition at line 171 of file WorldDeviceTransformer.h.
Referenced by device2World(), setTransformationParameters(), and world2Device().