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

#include <MICollisionItemCollection.h>

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

Public Member Functions

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

ICollisionItemCollection - Interface for classes that contain items to be decluttered by collision grid checking.

Member Function Documentation

◆ getCollisionItems()

virtual void Maria::ICollisionItemCollection::getCollisionItems ( const std::shared_ptr< RasterProjector > &  vp,
std::vector< CollisionItem > &  collisionItems,
std::vector< CollisionItem > &  alwaysVisibleItems 
)
pure virtual

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

Implemented in Maria::GeoRenderItemCollection, and Maria::SymbolLabelRenderer.

◆ initCollisionUpdate()

virtual void Maria::ICollisionItemCollection::initCollisionUpdate ( )
pure virtual

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.

Implemented in Maria::GeoRenderItemCollection, and Maria::SymbolLabelRenderer.

◆ needsCollisionUpdate()

virtual bool Maria::ICollisionItemCollection::needsCollisionUpdate ( const RasterProjector vp) const
pure virtual

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.

Implemented in Maria::GeoRenderItemCollection, and Maria::SymbolLabelRenderer.

◆ priority()

virtual int Maria::ICollisionItemCollection::priority ( ) const
pure virtual

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.

Implemented in Maria::GeoRenderItemCollection, and Maria::SymbolLabelRenderer.

◆ updateVisibility()

virtual void Maria::ICollisionItemCollection::updateVisibility ( const std::vector< VisibilityItem > &  items)
pure virtual

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

Parameters
itemsItems with visibility information.

Implemented in Maria::GeoRenderItemCollection, and Maria::SymbolLabelRenderer.


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