libosmscout  0.1
osmscout::TransBuffer Class Referencefinal

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. More...
 
bool GetBoundingBox (double &xmin, double &ymin, double &xmax, double &ymax) const
 Return the bounding box of the to be drawn display coordinates. More...
 
size_t GetEnd () const
 Return the last to be drawn point. More...
 
size_t GetLength () const
 Return the number of to be drawn points. More...
 
size_t GetStart () const
 Return the inex of the first to be drawn point. More...
 
bool IsEmpty () const
 Return true, if the TransBuffer holds data (length==0) More...
 
void Reset ()
 Reset length, start and end. More...
 
 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. More...
 
 ~TransBuffer ()
 

Public Attributes

TransPointpoints =nullptr
 

Detailed Description

Temporary stateful buffer for holding results of transformation of polygon from geo coords to display coords.

Constructor & Destructor Documentation

◆ TransBuffer()

osmscout::TransBuffer::TransBuffer ( )
default

◆ ~TransBuffer()

osmscout::TransBuffer::~TransBuffer ( )

References points.

Member Function Documentation

◆ CalcSize()

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().

◆ GetBoundingBox()

bool osmscout::TransBuffer::GetBoundingBox ( double &  xmin,
double &  ymin,
double &  xmax,
double &  ymax 
) const

Return the bounding box of the to be drawn display coordinates.

Parameters
xmin
ymin
xmax
ymax
Returns

References GetEnd(), GetStart(), IsEmpty(), points, osmscout::TransPoint::x, and osmscout::TransPoint::y.

◆ GetEnd()

size_t osmscout::TransBuffer::GetEnd ( ) const
inline

Return the last to be drawn point.

Returns

Referenced by osmscout::CopyPolygonToCoordBuffer(), and GetBoundingBox().

◆ GetLength()

◆ GetStart()

size_t osmscout::TransBuffer::GetStart ( ) const
inline

Return the inex of the first to be drawn point.

Returns

Referenced by osmscout::CopyPolygonToCoordBuffer(), and GetBoundingBox().

◆ IsEmpty()

bool osmscout::TransBuffer::IsEmpty ( ) const
inline

◆ Reset()

void osmscout::TransBuffer::Reset ( )

Reset length, start and end.

Referenced by osmscout::TransformArea(), and osmscout::TransformWay().

◆ TransformGeoToPixel()

template<typename C >
void osmscout::TransBuffer::TransformGeoToPixel ( const Projection projection,
const C &  nodes 
)
inline

Transform the given source array of GeoCoords to DisplayPoints in the buffer.

Template Parameters
Ca container object like list, vector or array
Parameters
projectionThe projection to use for transformation from geo coordinates to display coordinates
nodesThe container holding the geo coordinates

References osmscout::TransPoint::draw, and osmscout::Projection::BatchTransformer::GeoToPixel().

Referenced by osmscout::TransformArea(), and osmscout::TransformWay().

Member Data Documentation

◆ points


The documentation for this class was generated from the following files: