MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mbgl::Renderer Class Reference

#include <renderer.hpp>

Public Member Functions

 Renderer (gfx::RendererBackend &, float pixelRatio_, const std::optional< std::string > &localFontFamily=std::nullopt)
 
 ~Renderer ()
 
void markContextLost ()
 
void setObserver (RendererObserver *)
 
void render (const std::shared_ptr< UpdateParameters > &)
 
std::vector< FeaturequeryRenderedFeatures (const ScreenLineString &, const RenderedQueryOptions &options={}) const
 Feature queries. More...
 
std::vector< FeaturequeryRenderedFeatures (const ScreenCoordinate &point, const RenderedQueryOptions &options={}) const
 
std::vector< FeaturequeryRenderedFeatures (const ScreenBox &box, const RenderedQueryOptions &options={}) const
 
std::vector< FeaturequerySourceFeatures (const std::string &sourceID, const SourceQueryOptions &options={}) const
 
AnnotationIDs queryPointAnnotations (const ScreenBox &box) const
 
AnnotationIDs queryShapeAnnotations (const ScreenBox &box) const
 
AnnotationIDs getAnnotationIDs (const std::vector< Feature > &) const
 
FeatureExtensionValue queryFeatureExtensions (const std::string &sourceID, const Feature &feature, const std::string &extension, const std::string &extensionField, const std::optional< std::map< std::string, Value >> &args=std::nullopt) const
 Feature extension query. More...
 
void setFeatureState (const std::string &sourceID, const std::optional< std::string > &sourceLayerID, const std::string &featureID, const FeatureState &state)
 
void getFeatureState (FeatureState &state, const std::string &sourceID, const std::optional< std::string > &sourceLayerID, const std::string &featureID) const
 
void removeFeatureState (const std::string &sourceID, const std::optional< std::string > &sourceLayerID, const std::optional< std::string > &featureID, const std::optional< std::string > &stateKey)
 
void dumpDebugLogs ()
 
void collectPlacedSymbolData (bool enable)
 In Tile map mode, enables or disables collecting of the placed symbols data, which can be obtained with getPlacedSymbolsData(). More...
 
const std::vector< PlacedSymbolData > & getPlacedSymbolsData () const
 If collecting of the placed symbols data is enabled, returns the reference to the PlacedSymbolData vector holding the collected data. More...
 
void reduceMemoryUse ()
 
void clearData ()
 

Detailed Description

Definition at line 43 of file renderer.hpp.

Constructor & Destructor Documentation

◆ Renderer()

mbgl::Renderer::Renderer ( gfx::RendererBackend ,
float  pixelRatio_,
const std::optional< std::string > &  localFontFamily = std::nullopt 
)

◆ ~Renderer()

mbgl::Renderer::~Renderer ( )

Member Function Documentation

◆ clearData()

void mbgl::Renderer::clearData ( )

◆ collectPlacedSymbolData()

void mbgl::Renderer::collectPlacedSymbolData ( bool  enable)

In Tile map mode, enables or disables collecting of the placed symbols data, which can be obtained with getPlacedSymbolsData().

The placed symbols data collecting is disabled by default.

◆ dumpDebugLogs()

void mbgl::Renderer::dumpDebugLogs ( )

◆ getAnnotationIDs()

AnnotationIDs mbgl::Renderer::getAnnotationIDs ( const std::vector< Feature > &  ) const

◆ getFeatureState()

void mbgl::Renderer::getFeatureState ( FeatureState state,
const std::string &  sourceID,
const std::optional< std::string > &  sourceLayerID,
const std::string &  featureID 
) const

◆ getPlacedSymbolsData()

const std::vector<PlacedSymbolData>& mbgl::Renderer::getPlacedSymbolsData ( ) const

If collecting of the placed symbols data is enabled, returns the reference to the PlacedSymbolData vector holding the collected data.

Note: the returned vector gets re-populated at every render() call.

Returns
collected placed symbols data

◆ markContextLost()

void mbgl::Renderer::markContextLost ( )

◆ queryFeatureExtensions()

FeatureExtensionValue mbgl::Renderer::queryFeatureExtensions ( const std::string &  sourceID,
const Feature feature,
const std::string &  extension,
const std::string &  extensionField,
const std::optional< std::map< std::string, Value >> &  args = std::nullopt 
) const

Feature extension query.

◆ queryPointAnnotations()

AnnotationIDs mbgl::Renderer::queryPointAnnotations ( const ScreenBox box) const

◆ queryRenderedFeatures() [1/3]

std::vector<Feature> mbgl::Renderer::queryRenderedFeatures ( const ScreenBox box,
const RenderedQueryOptions options = {} 
) const

◆ queryRenderedFeatures() [2/3]

std::vector<Feature> mbgl::Renderer::queryRenderedFeatures ( const ScreenCoordinate point,
const RenderedQueryOptions options = {} 
) const

◆ queryRenderedFeatures() [3/3]

std::vector<Feature> mbgl::Renderer::queryRenderedFeatures ( const ScreenLineString ,
const RenderedQueryOptions options = {} 
) const

Feature queries.

◆ queryShapeAnnotations()

AnnotationIDs mbgl::Renderer::queryShapeAnnotations ( const ScreenBox box) const

◆ querySourceFeatures()

std::vector<Feature> mbgl::Renderer::querySourceFeatures ( const std::string &  sourceID,
const SourceQueryOptions options = {} 
) const

◆ reduceMemoryUse()

void mbgl::Renderer::reduceMemoryUse ( )

◆ removeFeatureState()

void mbgl::Renderer::removeFeatureState ( const std::string &  sourceID,
const std::optional< std::string > &  sourceLayerID,
const std::optional< std::string > &  featureID,
const std::optional< std::string > &  stateKey 
)

◆ render()

void mbgl::Renderer::render ( const std::shared_ptr< UpdateParameters > &  )

◆ setFeatureState()

void mbgl::Renderer::setFeatureState ( const std::string &  sourceID,
const std::optional< std::string > &  sourceLayerID,
const std::string &  featureID,
const FeatureState state 
)

◆ setObserver()

void mbgl::Renderer::setObserver ( RendererObserver )

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