![]() |
Maria GDK 5.0.0.850
Documentation of native code in develop branch
|
#include <MPointSymbolCell.h>
Classes | |
struct | CellItem |
The cell item represents one point symbol entry in the tile This item has a geographical and projected symbol position, as well as the symbol ID for the symbol and flags for scale, rotation, alpha, anchor alignment and grayscale. The flags are packed into 32 bits as follows: +----—+-----—+-----—+-------—+------—+-----—+ | alpha | Scale | Rotate | hAnchor | vAnchor | Misc. | +----—+-----—+-----—+-------—+------—+-----—+ 4b 8b 8b 5b 5b 2b. More... | |
Public Member Functions | |
PointSymbolCell (double minLat, double minLon, double maxLat, double maxLon) | |
void | setPointSymbol (const Maria::ItemId &id, const BasicGeoTypes::GeoPos &pos, const STK::Vector2f &offset, std::uint16_t symbolIdx, std::uint32_t flags1, std::uint32_t flags2) |
void | deletePointSymbol (const Maria::ItemId &id) |
const BasicGeoTypes::GeoPos & | getPosition (const Maria::ItemId &id) const |
std::uint32_t | getPointSymbolId (const Maria::ItemId &id) const |
std::uint32_t | getFlags1 (const Maria::ItemId &id) const |
std::uint32_t | getFlags2 (const Maria::ItemId &id) const |
float | getAlpha (const Maria::ItemId &id) const |
float | getScale (const Maria::ItemId &id) const |
float | getRotation (const Maria::ItemId &id) const |
float | getHAnchor (const Maria::ItemId &id) const |
float | getVAnchor (const Maria::ItemId &id) const |
bool | getGrayscale (const Maria::ItemId &id) const |
int | getNumPointSymbols () const |
bool | getCellItem (const Maria::ItemId &id, CellItem &cellItem) const |
STK::Matrix4x4f | calcTileMatrix (const Maria::RasterProjector &viewport) |
void | drawVertexArrays (GLuint quadVBO) |
void | redraw (const std::shared_ptr< RasterProjector > &vp, const STK::Matrix4x4f &mv, STK::ShaderProgram &shader, GLuint quadVBO) |
void | circleHitTest (const std::shared_ptr< RasterProjector > &vp, double px, double py, float symbolSize, int pickRadius, std::vector< Maria::ItemId > &items) |
void | hitTest (const std::shared_ptr< RasterProjector > &vp, const std::shared_ptr< RasterProjector > &pickVp, const STK::Matrix4x4f &mv, STK::ShaderProgram &shader, GLuint quadVBO, STK::FBOTexture &fbo, std::vector< Maria::ItemId > &items) |
PointSymbolCell - One batch of point symbol objects. Point symbols are batched in grid cells so that all symbols in one cell is rendered as an instanced vertex array. This is highly efficient in OpenGL and allows us to render huge amounts of point symbols.
The vertex buffer data consists of 2D position (in projection coordinates) and a symbol index pointing to the corresponding texture cell in the texture atlas.