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.  | |
| 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... | |
Public Attributes | |
| 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... | |
This class implements the logic for transforming from device coordinate to world coordinate and vice-versa.
Definition at line 42 of file WorldDeviceTransformer.h.
      
  | 
  inline | 
Empty constructor.
Definition at line 156 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 165 of file WorldDeviceTransformer.h.
References setTransformationParameters().
      
  | 
  inline | 
Destructor.
Definition at line 172 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 231 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, and m_wury.
      
  | 
  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 237 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 176 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, m_wlly, m_wurx, and m_wury.
Referenced by te::layout::Utils::viewportBoxFromMM(), and WorldDeviceTransformer().
      
  | 
  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 207 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, and m_wury.
Referenced by te::layout::Utils::transformToViewport().
      
  | 
  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 213 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 (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 224 of file WorldDeviceTransformer.h.
References m_mapUnitsPP, m_wllx, and m_wury.
| double te::map::WorldDeviceTransformer::m_mapUnitsPP | 
Map units per-pixel.
Definition at line 149 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 150 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 151 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 152 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 153 of file WorldDeviceTransformer.h.
Referenced by device2World(), setTransformationParameters(), and world2Device().