Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria::GeoLayer Class Referenceabstract

#include <MGeoLayer.h>

Inheritance diagram for Maria::GeoLayer:
Maria::CoveringLayer Maria::DrawLayer Maria::ElevationAnalysisLayer Maria::GeoBitmapLayer Maria::GridLayer Maria::MapLayer Maria::RadioNetworksLayer

Public Member Functions

 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.
 

Protected Attributes

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

GeoLayer - Geographical data layer

Member Function Documentation

◆ cleanupCaches()

void Maria::GeoLayer::cleanupCaches ( bool  keepCurrentFrame)
virtual

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.

Parameters
keepCurrentFrameKeep data that are necessary for the current frame (if applicable).

◆ needsRedraw()

bool Maria::GeoLayer::needsRedraw ( ) const
virtual

Check if a layer requires a redraw on next frame. This will typicall be due to changed content, newly loaded data, etc.

Returns

Reimplemented in Maria::DrawLayer, Maria::ElevationAnalysisLayer, Maria::GeoBitmapLayer, and Maria::MapLayer.

◆ update()

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

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 in Maria::GridLayer, Maria::MapLayer, and Maria::RadioNetworksLayer.


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