libosmscout  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
osmscout::OpenGLProjection Class Reference

#include <OpenGLProjection.h>

+ Inheritance diagram for osmscout::OpenGLProjection:

Public Member Functions

 OpenGLProjection ()=default
 
 OpenGLProjection (const OpenGLProjection &)=default
 
 OpenGLProjection (OpenGLProjection &&)=default
 
OpenGLProjectionoperator= (const OpenGLProjection &)=default
 
OpenGLProjectionoperator= (OpenGLProjection &&)=default
 
void SetShaderUniforms (GLuint shaderProgram) const
 Setup projection shader uniforms. More...
 
 ~OpenGLProjection () override=default
 
- Public Member Functions inherited from osmscout::MercatorProjection
bool CanBatch () const override
 
bool GeoToPixel (const GeoCoord &coord, Vertex2D &pixel) const override
 Converts a geo coordinate to a pixel coordinate. More...
 
bool IsLinearInterpolationEnabled () const
 
bool IsValid () const override
 
bool IsValidFor (const GeoCoord &coord) const override
 Return true if given coordinate is valid for this projection. More...
 
 MercatorProjection ()=default
 
 MercatorProjection (const MercatorProjection &)=default
 
 MercatorProjection (MercatorProjection &&)=default
 
bool Move (double horizPixel, double vertPixel)
 
bool MoveDown (double pixel)
 
bool MoveLeft (double pixel)
 
bool MoveRight (double pixel)
 
bool MoveUp (double pixel)
 
MercatorProjectionoperator= (const MercatorProjection &)=default
 
MercatorProjectionoperator= (MercatorProjection &&)=default
 
bool PixelToGeo (double x, double y, GeoCoord &coord) const override
 Converts a pixel coordinate to a geo coordinate. More...
 
bool Set (const GeoCoord &coord, const Magnification &magnification, double dpi, size_t width, size_t height)
 
bool Set (const GeoCoord &coord, const Magnification &magnification, size_t width, size_t height)
 
bool Set (const GeoCoord &coord, double angle, const Magnification &magnification, double dpi, size_t width, size_t height)
 Setup projection parameters. More...
 
bool Set (const GeoCoord &coord, double angle, const Magnification &magnification, size_t width, size_t height)
 
void SetLinearInterpolationUsage (bool useLinearInterpolation)
 Switch to enable/disable linear interpolation of latitude to pixel computation. More...
 
 ~MercatorProjection () override=default
 
- Public Member Functions inherited from osmscout::Projection
bool BoundingBoxToPixel (const GeoBox &boundingBox, ScreenBox &screenBox) const
 Converts a valid GeoBox to its on screen pixel coordinates. More...
 
double ConvertPixelToWidth (double pixel) const
 Convert a width in pixel into the equivalent mm size based on the given DPI. More...
 
double ConvertWidthToPixel (double width) const
 Convert a width in mm into the equivalent pixel size based on the given DPI. More...
 
double GetAngle () const
 Returns the angle in radians ([0..2*PI[) of the display in relation to the north. More...
 
GeoCoord GetCenter () const
 
GeoBox GetDimensions () const
 
double GetDPI () const
 Return the DPI as part of the projection. More...
 
size_t GetHeight () const
 Returns the height of the screen. More...
 
Magnification GetMagnification () const
 Return the magnification as part of the projection. More...
 
double GetMeterInMM () const
 Returns the number of on screen millimeters for one meter on the ground. More...
 
double GetMeterInPixel () const
 Returns the number of on screen pixel for one meter on the ground. More...
 
double GetPixelSize () const
 Returns the size of a pixel in meter. More...
 
ScreenBox GetScreenBox () const
 Return a ScreenBox instance for the screen. More...
 
size_t GetWidth () const
 Returns the width of the screen. More...
 
Projectionoperator= (const Projection &)=default
 
Projectionoperator= (Projection &&)=default
 
 Projection ()=default
 
 Projection (const Projection &)=default
 
 Projection (Projection &&)=default
 
virtual ~Projection ()=default
 

Additional Inherited Members

- Static Public Attributes inherited from osmscout::MercatorProjection
static const double MaxLat = +85.0511
 
static const double MaxLon = +180.0
 
static const double MinLat = -85.0511
 
static const double MinLon = -180.0
 
- Protected Member Functions inherited from osmscout::MercatorProjection
void GeoToPixel (const BatchTransformer &transformData) const override
 
- Protected Attributes inherited from osmscout::MercatorProjection
double angleCos =0.0
 
double angleNegCos =0.0
 
double angleNegSin =0.0
 
double angleSin =0.0
 
double latOffset =0.0
 Absolute and untransformed screen position of lat coordinate. More...
 
double scale =1.0
 
double scaledLatDeriv =0.0
 precalculated derivation of "latToYPixel" function in projection More...
 
double scaleGradtorad =0.0
 Precalculated scale*Gradtorad. More...
 
bool useLinearInterpolation =false
 switch to enable linear interpolation of latitude to pixel computation More...
 
bool valid =false
 projection is valid More...
 
- Protected Attributes inherited from osmscout::Projection
double angle =0.0
 Display rotation angle in radians, canvas clockwise. More...
 
GeoBox boundingBox
 Bounding box of the current projection on the ground. More...
 
GeoCoord center
 Coordinate of the center of the displayed area. More...
 
double dpi =0.0
 Screen DPI. More...
 
size_t height =0
 Height of image. More...
 
Magnification magnification
 Current magnification. More...
 
double meterInMM =0.0
 Number of on screen millimeters for one meter on the ground. More...
 
double meterInPixel =0.0
 Number of on screen pixel for one meter on the ground. More...
 
double pixelSize =0.0
 Size of a pixel in meter. More...
 
size_t width =0
 Width of image. More...
 

Constructor & Destructor Documentation

◆ OpenGLProjection() [1/3]

osmscout::OpenGLProjection::OpenGLProjection ( )
default

◆ OpenGLProjection() [2/3]

osmscout::OpenGLProjection::OpenGLProjection ( const OpenGLProjection )
default

◆ OpenGLProjection() [3/3]

osmscout::OpenGLProjection::OpenGLProjection ( OpenGLProjection &&  )
default

◆ ~OpenGLProjection()

osmscout::OpenGLProjection::~OpenGLProjection ( )
overridedefault

Member Function Documentation

◆ operator=() [1/2]

OpenGLProjection& osmscout::OpenGLProjection::operator= ( const OpenGLProjection )
default

◆ operator=() [2/2]

OpenGLProjection& osmscout::OpenGLProjection::operator= ( OpenGLProjection &&  )
default

◆ SetShaderUniforms()

void osmscout::OpenGLProjection::SetShaderUniforms ( GLuint  shaderProgram) const
inline

Setup projection shader uniforms.

Parameters
shaderProgram

Referenced by osmscout::OpenGLMapData< GL_RED, 1 >::SetMapProjection().


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