|
libosmscout 0.1
|
Temporary stateful buffer for holding results of transformation of polygon from geo coords to display coords. More...
#include <Transformation.h>
Public Member Functions | |
| void | CalcSize () |
| After direct writing access to the points array to have to call this method to correct internal start, end and length variables. | |
| bool | GetBoundingBox (double &xmin, double &ymin, double &xmax, double &ymax) const |
| Return the bounding box of the to be drawn display coordinates. | |
| size_t | GetEnd () const |
| Return the last to be drawn point. | |
| size_t | GetLength () const |
| Return the number of to be drawn points. | |
| size_t | GetStart () const |
| Return the inex of the first to be drawn point. | |
| bool | IsEmpty () const |
| Return true, if the TransBuffer holds data (length==0) | |
| void | Reset () |
| Reset length, start and end. | |
| TransBuffer ()=default | |
| template<typename C > | |
| void | TransformGeoToPixel (const Projection &projection, const C &nodes) |
| Transform the given source array of GeoCoords to DisplayPoints in the buffer. | |
| ~TransBuffer () | |
Public Attributes | |
| TransPoint * | points =nullptr |
Temporary stateful buffer for holding results of transformation of polygon from geo coords to display coords.
|
default |
| osmscout::TransBuffer::~TransBuffer | ( | ) |
References points.
| void osmscout::TransBuffer::CalcSize | ( | ) |
After direct writing access to the points array to have to call this method to correct internal start, end and length variables.
References points.
Referenced by osmscout::OptimizeArea(), and osmscout::OptimizeWay().
| bool osmscout::TransBuffer::GetBoundingBox | ( | double & | xmin, |
| double & | ymin, | ||
| double & | xmax, | ||
| double & | ymax | ||
| ) | const |
Return the bounding box of the to be drawn display coordinates.
| xmin | |
| ymin | |
| xmax | |
| ymax |
References GetEnd(), GetStart(), IsEmpty(), points, osmscout::TransPoint::x, and osmscout::TransPoint::y.
|
inline |
Return the last to be drawn point.
Referenced by osmscout::CopyPolygonToCoordBuffer(), and GetBoundingBox().
|
inline |
Return the number of to be drawn points.
Referenced by osmscout::DropEqualPoints(), osmscout::DropRedundantPointsDouglasPeuckerArea(), osmscout::DropRedundantPointsDouglasPeuckerWay(), osmscout::DropRedundantPointsFast(), osmscout::DropSimilarPoints(), and osmscout::EnsureSimple().
|
inline |
Return the inex of the first to be drawn point.
Referenced by osmscout::CopyPolygonToCoordBuffer(), and GetBoundingBox().
|
inline |
Return true, if the TransBuffer holds data (length==0)
Referenced by osmscout::CopyPolygonToCoordBuffer(), GetBoundingBox(), osmscout::TransformArea(), osmscout::TransformBoundingBox(), and osmscout::TransformWay().
| void osmscout::TransBuffer::Reset | ( | ) |
Reset length, start and end.
Referenced by osmscout::TransformArea(), and osmscout::TransformWay().
|
inline |
Transform the given source array of GeoCoords to DisplayPoints in the buffer.
| C | a container object like list, vector or array |
| projection | The projection to use for transformation from geo coordinates to display coordinates |
| nodes | The container holding the geo coordinates |
References osmscout::TransPoint::draw, and osmscout::Projection::BatchTransformer::GeoToPixel().
Referenced by osmscout::TransformArea(), and osmscout::TransformWay().
| TransPoint* osmscout::TransBuffer::points =nullptr |
Referenced by CalcSize(), osmscout::CopyPolygonToCoordBuffer(), osmscout::DropEqualPoints(), osmscout::DropRedundantPointsDouglasPeuckerArea(), osmscout::DropRedundantPointsDouglasPeuckerWay(), osmscout::DropRedundantPointsFast(), osmscout::DropSimilarPoints(), osmscout::EnsureSimple(), GetBoundingBox(), and ~TransBuffer().