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

#include <MSymbolLabelRenderer.h>

Inheritance diagram for Maria::SymbolLabelRenderer:
Maria::ICollisionItemCollection

Public Member Functions

 SymbolLabelRenderer (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< ItemSelection > &selection, const std::shared_ptr< PointSymbolRenderer > &symbolPointRenderer, int rows=18, int cols=36)
 
int getTileIndex (const Maria::ItemId &itemId)
 
void setTileIndex (const Maria::ItemId &itemId, int index)
 
std::shared_ptr< Maria::SymbolLabelTilegetTile (int idx)
 
std::shared_ptr< Maria::SymbolLabelTilegetOrCreateTile (int idx)
 
int calcRow (double lat)
 
int calcColumn (double lon)
 
int calcTileIndex (const BasicGeoTypes::GeoPos &gp)
 
void clear ()
 
void filterVisibleItems (const std::set< Maria::ItemId > &visibleItems)
 Update visible items by removing all items that are not in the visible items list.
 
void removeItem (const Maria::ItemId &itemId)
 
void update (const Maria::DrawObjectData &drawObject, const std::shared_ptr< Maria::CompositeStyleItem > &style, const std::shared_ptr< GeoUnitsSetting > &geoUnits)
 
void redraw (const std::shared_ptr< Maria::RasterProjector > &viewport, const STK::Matrix4x4f &pj, const STK::Matrix4x4f &mv, const STK::Viewport &vp)
 
void drawUnitQuad ()
 
virtual void getCollisionItems (const std::shared_ptr< RasterProjector > &vp, std::vector< CollisionItem > &collisionItems, std::vector< CollisionItem > &alwaysVisibleItems) override
 get a list of all items to be collision detected. This method must be thread-safe as it will be called from another thread than the main/gui thread.
 
virtual void updateVisibility (const std::vector< VisibilityItem > &items) override
 Update the visibility of items according to the given list of collision items.
 
virtual bool needsCollisionUpdate (const RasterProjector &vp) const override
 Check if the collection has changed so that we need to recalculate the visibility. This can for example be if any new items have been added or removed, or if items have changed size or shape. Will be run from main thread only.
 
virtual void initCollisionUpdate () override
 Initialize collision update. This will be run after a collision update has been deemed necessary, and before the actual update thread is starting. It can be used to update generation counters, dirty flags, etc. Will be run from main thread only.
 
virtual int priority () const override
 Priority of this collection relative to other collections to be collision checked in the same grid. Higher priorities are added first and more likely to be shown.
 
void setPriority (int priority)
 
virtual void getCollisionItems (const std::shared_ptr< RasterProjector > &vp, std::vector< CollisionItem > &collisionItems, std::vector< CollisionItem > &alwaysVisibleItems)=0
 get a list of all items to be collision detected. This method must be thread-safe as it will be called from another thread than the main/gui thread.
 
virtual void updateVisibility (const std::vector< VisibilityItem > &items)=0
 Update the visibility of items according to the given list of collision items.
 
virtual bool needsCollisionUpdate (const RasterProjector &vp) const =0
 Check if the collection has changed so that we need to recalculate the visibility. This can for example be if any new items have been added or removed, or if items have changed size or shape. Will be run from main thread only.
 
virtual void initCollisionUpdate ()=0
 Initialize collision update. This will be run after a collision update has been deemed necessary, and before the actual update thread is starting. It can be used to update generation counters, dirty flags, etc. Will be run from main thread only.
 
virtual int priority () const =0
 Priority of this collection relative to other collections to be collision checked in the same grid. Higher priorities are added first and more likely to be shown.
 

Detailed Description

SymbolLabelRenderer - Short description

Member Function Documentation

◆ getCollisionItems()

void SymbolLabelRenderer::getCollisionItems ( const std::shared_ptr< RasterProjector > &  vp,
std::vector< CollisionItem > &  collisionItems,
std::vector< CollisionItem > &  alwaysVisibleItems 
)
overridevirtual

get a list of all items to be collision detected. This method must be thread-safe as it will be called from another thread than the main/gui thread.

Parameters
vpInclude items in this viewport.
collisionItems(output) vector of CollisionItems
alwaysVisibleItems(output) vector of items that should always be visible

Implements Maria::ICollisionItemCollection.

◆ initCollisionUpdate()

virtual void Maria::SymbolLabelRenderer::initCollisionUpdate ( )
inlineoverridevirtual

Initialize collision update. This will be run after a collision update has been deemed necessary, and before the actual update thread is starting. It can be used to update generation counters, dirty flags, etc. Will be run from main thread only.

Implements Maria::ICollisionItemCollection.

◆ needsCollisionUpdate()

virtual bool Maria::SymbolLabelRenderer::needsCollisionUpdate ( const RasterProjector vp) const
inlineoverridevirtual

Check if the collection has changed so that we need to recalculate the visibility. This can for example be if any new items have been added or removed, or if items have changed size or shape. Will be run from main thread only.

Parameters
vpOnly include items in this viewport.
Returns
True if an update is required, false if not.

Implements Maria::ICollisionItemCollection.

◆ priority()

virtual int Maria::SymbolLabelRenderer::priority ( ) const
inlineoverridevirtual

Priority of this collection relative to other collections to be collision checked in the same grid. Higher priorities are added first and more likely to be shown.

Returns
Integer priority number. Higher numbers mean higher priority.

Implements Maria::ICollisionItemCollection.

◆ updateVisibility()

void Maria::SymbolLabelRenderer::updateVisibility ( const std::vector< VisibilityItem > &  items)
overridevirtual

Update the visibility of items according to the given list of collision items.

Parameters
itemsItems with visibility information.

Implements Maria::ICollisionItemCollection.


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