pub struct SymbolPlacementEngine {
pub config: SymbolPlacementConfig,
pub cross_tile_index: CrossTileSymbolIndex,
/* private fields */
}Expand description
Stateful placement engine with collision handling and fade persistence.
Fields§
§config: SymbolPlacementConfigPlacement tuning parameters.
cross_tile_index: CrossTileSymbolIndexCross-tile symbol index for deduplicating labels across tile boundaries.
Implementations§
Source§impl SymbolPlacementEngine
impl SymbolPlacementEngine
Sourcepub fn remove_tile(&mut self, tile_id: &TileId)
pub fn remove_tile(&mut self, tile_id: &TileId)
Remove all cross-tile index entries for a specific tile.
Call this when a tile is evicted from the tile cache so that the index releases the associated cross-tile IDs.
Sourcepub fn place_candidates(
&mut self,
candidates: &[SymbolCandidate],
projection: CameraProjection,
meters_per_pixel: f64,
dt_seconds: f64,
viewport_bounds: Option<&WorldBounds>,
) -> Vec<PlacedSymbol>
pub fn place_candidates( &mut self, candidates: &[SymbolCandidate], projection: CameraProjection, meters_per_pixel: f64, dt_seconds: f64, viewport_bounds: Option<&WorldBounds>, ) -> Vec<PlacedSymbol>
Place candidates for the current frame.
Trait Implementations§
Source§impl Clone for SymbolPlacementEngine
impl Clone for SymbolPlacementEngine
Source§fn clone(&self) -> SymbolPlacementEngine
fn clone(&self) -> SymbolPlacementEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SymbolPlacementEngine
impl Debug for SymbolPlacementEngine
Source§impl Default for SymbolPlacementEngine
impl Default for SymbolPlacementEngine
Source§fn default() -> SymbolPlacementEngine
fn default() -> SymbolPlacementEngine
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SymbolPlacementEngine
impl RefUnwindSafe for SymbolPlacementEngine
impl Send for SymbolPlacementEngine
impl Sync for SymbolPlacementEngine
impl Unpin for SymbolPlacementEngine
impl UnsafeUnpin for SymbolPlacementEngine
impl UnwindSafe for SymbolPlacementEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more