pub struct Projected { /* private fields */ }Expand description
Projected — a source that pushes raw (a, b) pairs through a pure
function. This is the seam a geographic projection plugs into without
facett-core learning what a latitude is: facett-geomap supplies
|lon, lat| mercator(lon, lat) and gets a PositionSource back.
The function must be pure and cheap; it is called once per visible feature
per frame (and batched through PositionSource::positions).
Implementations§
Trait Implementations§
Source§impl PositionSource for Projected
impl PositionSource for Projected
Source§fn feature_count(&self) -> usize
fn feature_count(&self) -> usize
How many features this source addresses. Ids are
0..feature_count().Source§fn kind(&self) -> &'static str
fn kind(&self) -> &'static str
Short tag for
state_json / diagnostics ("mercator", "layout", …).Source§fn bounds(&self, id: u32) -> WorldAabb
fn bounds(&self, id: u32) -> WorldAabb
The world-space extent of feature
id. Point features keep the default.
A road, a building footprint or a cluster hull overrides it — that box is
what the culler and the Hierarchy index.Source§fn positions(&self, ids: &[u32], out: &mut Vec<WorldPos>)
fn positions(&self, ids: &[u32], out: &mut Vec<WorldPos>)
Batch projection — the hot path. Overriding it is how a columnar
source (Arrow, a GPU-resident buffer) avoids a virtual call per feature.
Source§fn generation(&self) -> u64
fn generation(&self) -> u64
A generation counter. Bump it whenever positions move, so caches
(cull index, pick index, screen grids) know to rebuild. A static source
returns a constant; a live force layout returns its iteration number. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Projected
impl !UnwindSafe for Projected
impl Freeze for Projected
impl Send for Projected
impl Sync for Projected
impl Unpin for Projected
impl UnsafeUnpin for Projected
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more