Files
MapLibreParticleLab/src/mbgl/renderer/source_state.hpp
Bart Louwers 71f6da2722 Add clang-format (#1086)
Co-authored-by: mwilsnd <mwilsnd@gmail.com>
2023-05-01 16:57:37 +02:00

34 lines
974 B
C++

#pragma once
#include <mbgl/style/conversion.hpp>
#include <mbgl/util/feature.hpp>
namespace mbgl {
class RenderTile;
class SourceFeatureState {
public:
SourceFeatureState() = default;
~SourceFeatureState() = default;
void updateState(const std::optional<std::string>& sourceLayerID,
const std::string& featureID,
const FeatureState& newState);
void getState(FeatureState& result,
const std::optional<std::string>& sourceLayerID,
const std::string& featureID) const;
void removeState(const std::optional<std::string>& sourceLayerID,
const std::optional<std::string>& featureID,
const std::optional<std::string>& stateKey);
void coalesceChanges(std::vector<RenderTile>& tiles);
private:
LayerFeatureStates currentStates;
LayerFeatureStates stateChanges;
LayerFeatureStates deletedStates;
};
} // namespace mbgl