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

#include <MGeoRenderItem.h>

Classes

struct  RenderItemInstance
 

Public Member Functions

void addRenderItem (const std::shared_ptr< STK::RenderItem2D > &renderItem, bool declutter=false, bool separateLabel=false)
 Add a transient renderitem to the GeoRender. This item will not have a specific ID.
 
const std::vector< RenderItemInstance > & getTransientRenderItems () const
 
void clearTransientRenderItems ()
 
std::shared_ptr< STK::RenderItem2DgetRenderItem (int id)
 
void removeRenderItem (int id)
 
bool hasRenderItem (int id) const
 
void setRenderItem (int id, const std::shared_ptr< STK::RenderItem2D > &renderItem, bool declutter=false, bool separateLabel=false)
 Set reusable render item at a specific ID.
 
int getGraphicsRenderItems (std::vector< std::shared_ptr< STK::RenderItem2D > > &renderItems) const
 
std::vector< RenderItemInstancegetAllRenderItems () const
 
const std::unordered_map< int, RenderItemInstance > & getReusableRenderItems () const
 
int getDeclutterItems (std::vector< std::shared_ptr< STK::RenderItem2D > > &renderItems) const
 
void setTimestamp (int64_t timestamp)
 
int64_t getTimestamp () const
 
void setOrientedBoundingBox (const STK::OrientedBoundingBox2f &obb)
 
const STK::OrientedBoundingBox2fgetOrientedBoundingBox () const
 
void addToGraphicsRender (STK::GraphicsRender2D &render)
 
void removeFromGraphicsRender (STK::GraphicsRender2D &render)
 
void setGraphicsProjectorGeneration (int generation)
 
int getGraphicsProjectorGeneration () const
 
bool needsUpdate (int gfxProjectorGeneration) const
 

Detailed Description

GeoRenderItem - Geographically placed render item corresponding to a draw object.

This item contains viewport oriented graphics items for all the graphics relevant for one draw object. This may include both STK graphics primitives for text and vector graphics, as well as point symbol entries in the point symbol renderer.

The render items are created in pixel coordinates for the current viewport and a local affine transform is created during rendering to transform the item from the creation viewport to the current rendering viewport.

The render items are divided into two categories; Reusable and transient. Reusable items have a specific ID and can be retrieved for update when data changes. Transient items must re-generated each time the GeoRenderItem is updated.

Member Function Documentation

◆ addRenderItem()

void Maria::GeoRenderItem::addRenderItem ( const std::shared_ptr< STK::RenderItem2D > &  renderItem,
bool  declutter = false,
bool  separateLabel = false 
)
inline

Add a transient renderitem to the GeoRender. This item will not have a specific ID.

Parameters
renderItemitem to add
declutterif the object should be decluttered
separateLabelIf the object should be handled separately during tile rendering.

◆ clearTransientRenderItems()

void Maria::GeoRenderItem::clearTransientRenderItems ( )
inline

Clean out all transient render items.

◆ getAllRenderItems()

std::vector< RenderItemInstance > Maria::GeoRenderItem::getAllRenderItems ( ) const
inline

Get all render item instances, both transient and reusable.

◆ getGraphicsRenderItems()

int Maria::GeoRenderItem::getGraphicsRenderItems ( std::vector< std::shared_ptr< STK::RenderItem2D > > &  renderItems) const
inline

Get all STK graphics render items, both transient and reusable.

◆ getRenderItem()

std::shared_ptr< STK::RenderItem2D > Maria::GeoRenderItem::getRenderItem ( int  id)
inline

Get specific render item by ID

◆ hasRenderItem()

bool Maria::GeoRenderItem::hasRenderItem ( int  id) const
inline

Get if specific item (by ID) is in the set of reusable items.

Parameters
idTo Fetch
Returns
True if it exists in the set of reusableRenderItems

◆ setRenderItem()

void Maria::GeoRenderItem::setRenderItem ( int  id,
const std::shared_ptr< STK::RenderItem2D > &  renderItem,
bool  declutter = false,
bool  separateLabel = false 
)
inline

Set reusable render item at a specific ID.

Parameters
renderItemitem to add
declutterif the object should be decluttered
separateLabelIf the object should be handled separately during tile rendering.

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