#pragma once #include #include #include namespace mbgl { namespace style { class LayerProperties; enum class TranslateAnchorType : bool; } // namespace style class TransformState; class LayerGroup; class PaintParameters; class RenderTree; class UnwrappedTileID; using mat4 = std::array; /** Base class for layer tweakers, which manipulate layer group per frame */ class LayerTweaker { protected: LayerTweaker(Immutable properties); public: LayerTweaker() = delete; virtual ~LayerTweaker() = default; virtual void execute(LayerGroup&, const RenderTree&, const PaintParameters&) = 0; protected: static mat4 getTileMatrix(const UnwrappedTileID&, const RenderTree&, const TransformState&, const std::array& translation, style::TranslateAnchorType, bool inViewportPixelUnits); protected: Immutable evaluatedProperties; }; } // namespace mbgl