libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::MapPainterOpenGL Class Reference

#include <MapPainterOpenGL.h>

Public Member Functions

void DrawMap (RenderSteps startStep=RenderSteps::FirstStep, RenderSteps endStep=RenderSteps::LastStep)
 OpenGL draw call.
osmscout::GeoCoord GetCenter () const
 Returns the visual center of the map.
size_t GetExaminedRingCount () const
 Number of rings the visibility decision of the last ProcessAreas call was applied to.
size_t GetKeptRingCount () const
 Number of rings the last ProcessAreas call kept and prepared geometry for.
osmscout::Magnification GetMagnification () const
MercatorProjection GetProjection () const
bool IsInitialized () const
 MapPainterOpenGL (int width, int height, double dpi, const std::string &fontPath, const std::string &shaderDir, const osmscout::MapParameter &parameter)
void OnTranslation (int startPointX, int startPointY, int endPointX, int endPointY)
 Translates the map to the given direction.
void OnZoom (float zoomDirection)
 Zooms on the map.
void ProcessData (const osmscout::MapData &data, const osmscout::Projection &loadProjection, const osmscout::StyleConfigRef &styleConfig)
 Processes all OSM data, and converts to the format required by the OpenGL pipeline.
void SetCenter (const osmscout::GeoCoord &center)
void SetMagnification (const osmscout::Magnification &magnification)
void SetSize (int width, int height)
void SwapData ()
 Swaps currently drawn data and processed data.
 ~MapPainterOpenGL ()

Constructor & Destructor Documentation

◆ MapPainterOpenGL()

osmscout::MapPainterOpenGL::MapPainterOpenGL ( int width,
int height,
double dpi,
const std::string & fontPath,
const std::string & shaderDir,
const osmscout::MapParameter & parameter )

◆ ~MapPainterOpenGL()

osmscout::MapPainterOpenGL::~MapPainterOpenGL ( )

Member Function Documentation

◆ DrawMap()

void osmscout::MapPainterOpenGL::DrawMap ( RenderSteps startStep = RenderSteps::FirstStep,
RenderSteps endStep = RenderSteps::LastStep )

OpenGL draw call.

Draws all feature of the map to the context.

References osmscout::Initialize, and osmscout::log.

◆ GetCenter()

osmscout::GeoCoord osmscout::MapPainterOpenGL::GetCenter ( ) const

Returns the visual center of the map.

◆ GetExaminedRingCount()

size_t osmscout::MapPainterOpenGL::GetExaminedRingCount ( ) const
inline

Number of rings the visibility decision of the last ProcessAreas call was applied to.

The counter exists so a test can observe that a ring the decision discards costs no per-ring geometry work; it is reset at the start of every ProcessAreas call.

◆ GetKeptRingCount()

size_t osmscout::MapPainterOpenGL::GetKeptRingCount ( ) const
inline

Number of rings the last ProcessAreas call kept and prepared geometry for.

The counter exists so a test can observe that the per-ring work follows the rings the view keeps; it is reset at the start of every ProcessAreas call.

◆ GetMagnification()

osmscout::Magnification osmscout::MapPainterOpenGL::GetMagnification ( ) const

◆ GetProjection()

MercatorProjection osmscout::MapPainterOpenGL::GetProjection ( ) const

◆ IsInitialized()

bool osmscout::MapPainterOpenGL::IsInitialized ( ) const
inline

◆ OnTranslation()

void osmscout::MapPainterOpenGL::OnTranslation ( int startPointX,
int startPointY,
int endPointX,
int endPointY )

Translates the map to the given direction.

References osmscout::GeoCoord::GetLat(), osmscout::GeoCoord::GetLon(), and SetCenter().

◆ OnZoom()

void osmscout::MapPainterOpenGL::OnZoom ( float zoomDirection)

Zooms on the map.

References osmscout::Magnification::SetLevel(), and SetMagnification().

◆ ProcessData()

void osmscout::MapPainterOpenGL::ProcessData ( const osmscout::MapData & data,
const osmscout::Projection & loadProjection,
const osmscout::StyleConfigRef & styleConfig )

Processes all OSM data, and converts to the format required by the OpenGL pipeline.

References osmscout::ProcessAreas.

◆ SetCenter()

void osmscout::MapPainterOpenGL::SetCenter ( const osmscout::GeoCoord & center)

References osmscout::GeoCoord::Set().

Referenced by OnTranslation().

◆ SetMagnification()

void osmscout::MapPainterOpenGL::SetMagnification ( const osmscout::Magnification & magnification)

References osmscout::Magnification::GetLevel().

Referenced by OnZoom().

◆ SetSize()

void osmscout::MapPainterOpenGL::SetSize ( int width,
int height )

◆ SwapData()

void osmscout::MapPainterOpenGL::SwapData ( )

Swaps currently drawn data and processed data.


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