Maria GDK 5.0.0.737
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria::GridLayer Class Reference

#include <MGridLayer.h>

Inheritance diagram for Maria::GridLayer:
Maria::GeoLayer

Public Member Functions

 GridLayer (const std::string &id, const std::shared_ptr< STK::ShaderProgramManager > &shaderManager, const std::shared_ptr< STK::FontManager > &fontManager, const std::shared_ptr< STK::Screen > &screen, int depth)
 
virtual bool update (const std::shared_ptr< RasterProjector > &viewport, double scale, float pixelScale) override
 Update layer for rendering. This method should determine if there is anything to render in the layer, and prepare the layer for rendering.
 
virtual void redraw (const std::shared_ptr< RasterProjector > &vp, const STK::Camera &cam, const STK::Viewport &glViewport) override
 
void setGridFrame (const GridFrameSettings &frameSettings)
 
bool addGrid (int gridType, const std::string &id)
 
void removeGrid (const std::string &id)
 
int getNumberOfLineElements (const std::string &id) const
 
void setLineThickness (const std::string &id, int lineElement, float thickness)
 
void setLineColor (const std::string &id, int lineElement, const STK::Color4f &color)
 
void setGridVisible (const std::string &id, bool bVisible)
 
bool setLabelFont (const std::string &id, GridLabelPlacement glplc, GridLabelPart glpart, const std::string &fontFamily, int fontSize, STK::FontStyle fontStyle=STK::FontStyle::Regular)
 
void setLabelColor (const std::string &id, GridLabelPlacement glplc, const STK::Color4f &color)
 
void setFrameOffset (const std::string &id, int frameOffset)
 
void setUseVerticalLabels (const std::string &id, bool useVertical)
 
int setMarkerFonts (const std::string &id, const std::string &fontFamily, int minSize, int maxSize, STK::FontStyle fontStyle=STK::FontStyle::Regular)
 
void setCgrsAreaOfDefinition (const std::string &id, double dMinLat, double dMinLon, double dMaxLat, double dMaxLon, int minSpacingInMinutesLongitude=5, int minSpacingInMinutesLatitude=5)
 
void setWhiskeyAreaOfDefinition (const std::string &id, double dLat, double dLon, const MGrid4WhiskeyOriginReference &originReference, double rotation, double cellSizeX, double cellSizeY, int nLinesX, int nLinesY)
 
void setStartLabel (const std::string &id, const std::string &startLabel)
 
void setUnwantedLetters (const std::string &id, const std::string &unwantedLetters)
 
void setStartIndex (const std::string &id, int startIndex)
 
void setUnwantedIndices (const std::string &id, const std::string &unwantedIndeces)
 
void setCcgo (const std::string &id, double lat, double lon)
 
void setUpdateGraph (const std::shared_ptr< STK::PerformanceGraphs::Graph > &g)
 
void setRenderGraph (const std::shared_ptr< STK::PerformanceGraphs::Graph > &g)
 
- Public Member Functions inherited from Maria::GeoLayer
 GeoLayer (const std::string &id, int depth)
 
void setClippingMargins (int left, int right, int top, int bottom)
 
void getClippingMargins (int &left, int &right, int &top, int &bottom)
 
bool needsClipping () const
 
void beginClipping (const STK::Viewport &glViewport)
 
void endClipping ()
 
int getDepth () const
 
const std::string & getId () const
 
void setOpacity (float opacity)
 
float getOpacity () const
 
bool isEnabled () const
 
void setEnabled (bool enabled)
 
void setLayerDirty (bool dirty)
 
bool isLayerDirty () const
 
void setPerformanceGraph (const std::shared_ptr< STK::PerformanceGraphs::Graph > &perf)
 
const std::shared_ptr< STK::PerformanceGraphs::Graph > & getPerformanceGraph () const
 
virtual bool update (const std::shared_ptr< RasterProjector > &viewport, double scale, float pixelScale)
 Update layer for rendering. This method should determine if there is anything to render in the layer, and prepare the layer for rendering.
 
virtual void redraw (const std::shared_ptr< RasterProjector > &vp, const STK::Camera &cam, const STK::Viewport &glViewport)=0
 
virtual void cleanupCaches (bool keepCurrentFrame)
 This method is called at regular intervals to clean up cached data, such as OpenGL textures, graphics buffers etc. Only data that can be reproduced automatically should be cleaned up by this method.
 
virtual bool needsRedraw () const
 Check if a layer requires a redraw on next frame. This will typicall be due to changed content, newly loaded data, etc.
 

Additional Inherited Members

- Protected Attributes inherited from Maria::GeoLayer
int _depth = -1
 
std::string _id
 
float _opacity = 1.0f
 
bool _enabled = true
 
int _clipLeft = 0
 
int _clipRight = 0
 
int _clipTop = 0
 
int _clipBottom = 0
 
std::shared_ptr< STK::PerformanceGraphs::Graph_perfGraph
 

Detailed Description

GridLayer - Short description

Member Function Documentation

◆ redraw()

void Maria::GridLayer::redraw ( const std::shared_ptr< RasterProjector > &  vp,
const STK::Camera cam,
const STK::Viewport glViewport 
)
overridevirtual

Implements Maria::GeoLayer.

◆ update()

bool Maria::GridLayer::update ( const std::shared_ptr< RasterProjector > &  viewport,
double  scale,
float  pixelScale 
)
overridevirtual

Update layer for rendering. This method should determine if there is anything to render in the layer, and prepare the layer for rendering.

Parameters
viewport
scaleMap scale for the current view.
pixelScaleScale factor for the pixel allowed pixel size.
Returns
True if the layer should be rendered, false if not.

Reimplemented from Maria::GeoLayer.


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