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

#include <MDrawLayer.h>

Inheritance diagram for Maria::DrawLayer:
Maria::GeoLayer

Public Member Functions

 DrawLayer (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, const std::shared_ptr< DrawObjectManager > &drawObjectManager, const std::shared_ptr< GeoUnitsSetting > &geoUnitsSetting, int depth)
 
void syncStores ()
 
int getIntersectingItems (const std::shared_ptr< RasterProjector > &vp, double x, double y, std::vector< ItemId > &items, int pickRadius=4)
 
void setDrawObjectStyle (const std::string &styleXml)
 
void setSymbolSet (const std::string &symbolset)
 
void renderDebug (const std::shared_ptr< RasterProjector > &vp, const STK::Viewport &glViewport)
 
void updateStyling (bool forceFullUpdate)
 
const std::shared_ptr< Maria::StyleSet > & getStyleSet () const
 
std::shared_ptr< Maria::CompositeStyleItemgetResolvedStyle (const ItemId &objectId)
 
STK::OrientedBoundingBox2f getOrientedViewBoundingBox (const std::shared_ptr< RasterProjector > &vp, ItemId objectId)
 
STK::OrientedBoundingBox2f getOrientedViewBoundingBox (const std::shared_ptr< RasterProjector > &vp, const std::shared_ptr< DrawObjectData > &drawObject)
 
void redraw (const std::shared_ptr< RasterProjector > &vp, const STK::Camera &cam, const STK::Viewport &glViewport) override
 
bool needsRedraw () const override
 Check if a layer requires a redraw on next frame. This will typicall be due to changed content, newly loaded data, etc.
 
const std::shared_ptr< PointSymbolRenderer > & getPointSymbolRenderer () const
 
const std::shared_ptr< SymbolLabelRenderer > & getSymbolLabelRenderer () const
 
void setUpdateGraph (const std::shared_ptr< STK::PerformanceGraphs::Graph > &g)
 
void setGraphicsGraph (const std::shared_ptr< STK::PerformanceGraphs::Graph > &g)
 
void setSymbolsGraph (const std::shared_ptr< STK::PerformanceGraphs::Graph > &g)
 
void setLabelsGraph (const std::shared_ptr< STK::PerformanceGraphs::Graph > &g)
 
void setClusterUpdateGraph (const std::shared_ptr< STK::PerformanceGraphs::Graph > &graph)
 
void setClusterRenderGraph (const std::shared_ptr< STK::PerformanceGraphs::Graph > &graph)
 
void setSelected (const Maria::ItemId &itemId, bool selected)
 
bool isSelected (const Maria::ItemId &itemId) const
 
MariaProtobuf::ClusterSettings getClusteringSettings () const
 
void setClusteringSettings (const MariaProtobuf::ClusterSettings &clusteringSettings)
 
void clearGeoStore ()
 
void setGeoStoreId (std::string geoStoreId)
 
void setFilter (const std::string &filterXml, const std::vector< std::string > &listIds)
 
std::shared_ptr< Maria::DrawObjectStoregetDrawObjectStore () const
 
void setViewSymbolScale (double scale)
 
double getViewSymbolScale () const
 
void setSymbolSize (double size)
 
double getSymbolSize () const
 
- 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

DrawLayer - Short description

Member Function Documentation

◆ getIntersectingItems()

int DrawLayer::getIntersectingItems ( const std::shared_ptr< RasterProjector > &  vp,
double  x,
double  y,
std::vector< ItemId > &  items,
int  pickRadius = 4 
)

Find draw objects intersecting a screen position. Returns a list of all draw objects hit by the input pixel at position x, y, within a radius of 3 pixels.

◆ getSymbolSize()

double Maria::DrawLayer::getSymbolSize ( ) const
inline

Get base symbol size (in pixels). This is the default size for all symbols, which may be scaled according to styling.

◆ getViewSymbolScale()

double DrawLayer::getViewSymbolScale ( ) const

Get symbol styling scale factor. This value can be used through the [ViewSymbolScale] style context variable.

◆ needsRedraw()

bool Maria::DrawLayer::needsRedraw ( ) const
overridevirtual

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

Returns

Reimplemented from Maria::GeoLayer.

◆ redraw()

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

Implements Maria::GeoLayer.

◆ setSymbolSize()

void Maria::DrawLayer::setSymbolSize ( double  size)
inline

Set base symbol size (in pixels). This is the default size for all symbols, which may be scaled according to styling.

◆ setViewSymbolScale()

void DrawLayer::setViewSymbolScale ( double  scale)

Set symbol styling scale factor. This value can be used through the [ViewSymbolScale] style context variable.


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