#pragma once #include #include #include namespace mbgl { class TransformState; class RenderTile; class SymbolSizeBinder; class PlacedSymbol; namespace style { class SymbolPropertyValues; } // end namespace style struct TileDistance { TileDistance(float prevTileDistance_, float lastSegmentViewportDistance_) : prevTileDistance(prevTileDistance_), lastSegmentViewportDistance(lastSegmentViewportDistance_) {} float prevTileDistance; float lastSegmentViewportDistance; }; struct PlacedGlyph { PlacedGlyph() = default; PlacedGlyph(Point point_, float angle_, optional tileDistance_) : point(point_), angle(angle_), tileDistance(std::move(tileDistance_)) {} PlacedGlyph(PlacedGlyph&& other) noexcept : point(other.point), angle(other.angle), tileDistance(std::move(other.tileDistance)) {} PlacedGlyph(const PlacedGlyph& other) : point(other.point), angle(other.angle), tileDistance(other.tileDistance) {} Point point; float angle; optional tileDistance; }; float evaluateSizeForFeature(const ZoomEvaluatedSize& zoomEvaluatedSize, const PlacedSymbol& placedSymbol); mat4 getLabelPlaneMatrix(const mat4& posMatrix, const bool pitchWithMap, const bool rotateWithMap, const TransformState& state, const float pixelsToTileUnits); mat4 getGlCoordMatrix(const mat4& posMatrix, const bool pitchWithMap, const bool rotateWithMap, const TransformState& state, const float pixelsToTileUnits); using PointAndCameraDistance = std::pair,float>; PointAndCameraDistance project(const Point& point, const mat4& matrix); void reprojectLineLabels(gfx::VertexVector>&, const std::vector&, const mat4& posMatrix, bool pitchWithMap, bool rotateWithMap, bool keepUpright, const RenderTile&, const SymbolSizeBinder& sizeBinder, const TransformState&); optional> placeFirstAndLastGlyph(const float fontScale, const float lineOffsetX, const float lineOffsetY, const bool flip, const Point& anchorPoint, const Point& tileAnchorPoint, const PlacedSymbol& symbol, const mat4& labelPlaneMatrix, const bool returnTileDistance); void hideGlyphs(std::size_t numGlyphs, gfx::VertexVector>& dynamicVertices); void addDynamicAttributes(const Point& anchorPoint, const float angle, gfx::VertexVector>& dynamicVertices); } // end namespace mbgl