Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria3D::PointSymbolRenderer Class Reference

#include <M3DPointSymbolRenderer.h>

Public Member Functions

 PointSymbolRenderer (const std::shared_ptr< LocalOrigin > &localOrigin, const std::shared_ptr< STK::FontManager > &fontManager, const std::shared_ptr< STK::ShaderProgramManager > &shaderManager, const std::shared_ptr< Maria::SymbolCache > &symbolCache, const std::shared_ptr< ModelManager > &modelManager, const std::shared_ptr< PointSymbolParams > &params, const std::shared_ptr< Globe > &globe, const std::shared_ptr< STK::Screen > &screen, int gridRows=18, int gridCols=36)
 
bool initShader ()
 
GLuint getQuadVBO ()
 
const std::shared_ptr< LocalOrigin > & getLocalOrigin () const
 
void renderBillboards (const STK::Camera &cam, const STK::Viewport &vp)
 
const std::map< Maria::ItemId, std::shared_ptr< Maria3D::SymbolModel > > getTrackModels () const
 
void update (const STK::Camera &cam, const STK::Viewport &vp, std::vector< std::shared_ptr< Maria::GenericGeoObjectAdapter > > tracks, std::shared_ptr< Maria::GenericGeoObjectProvider > geoObjectProvider, const std::map< Maria::ItemId, std::shared_ptr< Maria::CompositeStyleItem > > &resolvedStyles)
 
const std::string & getSymbolType () const
 
void setSymbolType (const std::string &symbolType)
 
const std::string & getDefaultSymbolCode () const
 
void setDefaultSymbolCode (const std::string &defaultSymbolCode)
 
bool getGeoPosition (const Maria::ItemId &id, STK::Vector3d &pos)
 
bool getGeoPosition (const SymbolRenderItem &item, STK::Vector3d &pos)
 
void removePoints (const std::vector< std::shared_ptr< Maria::GenericGeoObjectAdapter > > &points)
 
bool getItemInView (const STK::Camera &cam, const STK::Viewport &vp, double x, double y, double hitRadius, Maria::ItemId &item)
 
void selectPoints (const std::set< Maria::ItemId > &items)
 
void deselectPoints (const std::set< Maria::ItemId > &items)
 
void setParams (const std::shared_ptr< PointSymbolParams > &params)
 
const std::shared_ptr< PointSymbolParams > & getParams () const
 

Protected Member Functions

bool initQuadVBO ()
 
void updateSymbol (std::shared_ptr< Maria::GenericGeoObjectAdapter > trk, const STK::Vector3d &camPosGeo, const STK::Camera &cam, const STK::Viewport &vp, const std::map< Maria::ItemId, std::shared_ptr< Maria::CompositeStyleItem > > &resolvedStyles)
 
void checkSymbolModels (STK::Vector3d &camPosGeo, std::vector< std::shared_ptr< Maria::GenericGeoObjectAdapter > > &tracks, std::shared_ptr< Maria::GenericGeoObjectProvider > trackManager)
 
std::shared_ptr< SymbolModeladdSymbolModel (std::shared_ptr< Maria::GenericGeoObjectAdapter > trk, const std::string &modelType)
 
std::string getLabelText (std::shared_ptr< Maria::GenericGeoObjectAdapter > trk, std::shared_ptr< Maria::CompositeStyleItem > style)
 
void updateLabel (std::shared_ptr< Maria::GenericGeoObjectAdapter > trk, std::shared_ptr< Maria::CompositeStyleItem > style, const std::shared_ptr< SymbolModel > &model)
 
double calcVerticalScreenOffset (int flags, double iconElevOffset)
 
bool getSymbolIndex (std::shared_ptr< Maria::GenericGeoObjectAdapter > trk, std::shared_ptr< Maria::CompositeStyleItem > style, Maria::SymbolCache::SymbolIndexT &symbolIndex, float &centerX, float &centerY)
 
void calcCellIndexesInRange (double lat, double lon, double range, int &minRow, int &minCol, int &maxRow, int &maxCol)
 
std::shared_ptr< PointSymbolRenderLayergetOrCreateLayer (int layerId)
 
double calcVisualGroundElevation (const std::shared_ptr< Maria::GenericGeoObjectAdapter > &trk, const STK::Vector3d &camPosGeo, const STK::Camera &cam, const STK::Viewport &vp)
 
void updateSymbolWithStyle (std::shared_ptr< Maria::GenericGeoObjectAdapter > trk, const STK::Vector3d &camPosGeo, const STK::Camera &cam, const STK::Viewport &vp, const std::shared_ptr< Maria::CompositeStyleItem > &style)
 
void removePointSymbolItem (Maria::ItemId itemId)
 

Protected Attributes

std::shared_ptr< LocalOrigin_localOrigin
 
std::shared_ptr< STK::FontManager_fontManager
 
std::shared_ptr< STK::ShaderProgramManager_shaderManager
 
std::shared_ptr< Maria::SymbolCache_symbolCache
 
std::shared_ptr< ModelManager_modelManager
 
std::shared_ptr< Maria3D::Globe_globe
 
std::shared_ptr< STK::Screen_screen
 
int _gridRows
 
int _gridCols
 
std::mutex _rwLock
 
std::map< Maria::ItemId, SymbolRenderItem * > _renderItems
 
GLuint _quadVBO
 
std::shared_ptr< STK::ShaderProgram_shader
 
std::shared_ptr< STK::ShaderProgram_hitShader
 
std::shared_ptr< PointSymbolParams_params
 
STK::Vector3d _lastCamPosGeo
 
std::string _defaultSymbolType
 
std::string _defaultSymbolCode
 
std::map< Maria::ItemId, std::shared_ptr< SymbolModel > > _symbolModels
 
std::vector< std::shared_ptr< PointSymbolRenderLayer > > _gridLayers
 
std::set< Maria::ItemId_selectedItems
 

Detailed Description

PointSymbolRenderer - Short description. Detailed description.

Member Function Documentation

◆ getTrackModels()

const std::map< Maria::ItemId, std::shared_ptr< Maria3D::SymbolModel > > Maria3D::PointSymbolRenderer::getTrackModels ( ) const
inline

Get the list of currently active track models.

◆ removePoints()

void Maria3D::PointSymbolRenderer::removePoints ( const std::vector< std::shared_ptr< Maria::GenericGeoObjectAdapter > > &  points)

Remove all point objects matching the given list ID.

◆ renderBillboards()

void PointSymbolRenderer::renderBillboards ( const STK::Camera cam,
const STK::Viewport vp 
)

Render all billboard tracks.

◆ update()

void Maria3D::PointSymbolRenderer::update ( const STK::Camera cam,
const STK::Viewport vp,
std::vector< std::shared_ptr< Maria::GenericGeoObjectAdapter > >  tracks,
std::shared_ptr< Maria::GenericGeoObjectProvider geoObjectProvider,
const std::map< Maria::ItemId, std::shared_ptr< Maria::CompositeStyleItem > > &  resolvedStyles 
)

Update point symbols. This method will update the styling, labels and elevation of the given points.


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