mln-rs-engine 0.0.19

Part of mln-rs, a Rust port of the MapLibre Native map rendering core. Depend on mln-rs instead.
Documentation
use std::sync::Arc;

use mln_style::expression::GlobalStateMap;
use mln_style::subdivision_granularity::SubdivisionGranularitySetting;

use crate::camera::View;
use crate::map::MapMode;
use crate::render::terrain::TerrainCover;
use crate::storage::FileSource;
use crate::text::glyph::FontFaces;
use crate::tile_store::TileLodMode;

/// What a source's update gives its tiles.
pub(crate) struct TileParameters<'a> {
    pub(crate) pixel_ratio: f32,
    pub(crate) view: &'a View,
    /// The map's zoom range, which tiles load within.
    pub(crate) min_zoom: f64,
    pub(crate) max_zoom: f64,
    pub(crate) file_source: Option<Arc<dyn FileSource>>,
    pub(crate) mode: MapMode,
    pub(crate) prefetch_zoom_delta: u8,
    pub(crate) tile_lod_min_radius: f64,
    pub(crate) tile_lod_scale: f64,
    pub(crate) tile_lod_pitch_threshold: f64,
    pub(crate) tile_lod_zoom_shift: f64,
    pub(crate) tile_lod_mode: TileLodMode,
    pub(crate) subdivision_granularity: SubdivisionGranularitySetting,
    pub(crate) global_state: Option<Arc<GlobalStateMap>>,
    /// The style's font faces, which the tiles' layouts shape text with.
    pub(crate) font_faces: Option<Arc<FontFaces>>,
    /// Whether the style has a `glyphs` URL.
    pub(crate) glyph_pbfs: bool,
    /// How many placements have committed before the update
    /// (`PlacementController::commits`), which the tiles the view leaves
    /// stay rendered for while their symbols fade out.
    pub(crate) placement_commits: u64,
    /// The terrain's cover while terrain draws, whose elevation ranges cull
    /// the sources' covers.
    pub(crate) terrain: Option<&'a TerrainCover>,
}