pub struct Clipmap { /* private fields */ }Expand description
Sichtbare Zellmenge um eine bewegte Kamera.
Implementations§
Source§impl Clipmap
impl Clipmap
pub fn new(cfg: ClipmapConfig) -> Self
pub fn config(&self) -> &ClipmapConfig
Sourcepub fn anchor_center(&self) -> Option<Vec2>
pub fn anchor_center(&self) -> Option<Vec2>
Weltmittelpunkt des aktuellen Ankers.
Sourcepub fn cells(&self) -> &[ActiveCell]
pub fn cells(&self) -> &[ActiveCell]
Alle aktuell aktiven Zellen, sortiert nach (ebene, abstand, x, y).
pub fn is_active(&self, key: CellKey) -> bool
Sourcepub fn set_center(&mut self, camera: Vec2) -> Option<ClipDiff>
pub fn set_center(&mut self, camera: Vec2) -> Option<ClipDiff>
Kamera setzen; liefert None, wenn sie dieselbe Basiszelle wie
beim letzten Aufruf trifft (dann hat sich nichts zu ändern).
Auto Trait Implementations§
impl Freeze for Clipmap
impl RefUnwindSafe for Clipmap
impl Send for Clipmap
impl Sync for Clipmap
impl Unpin for Clipmap
impl UnsafeUnpin for Clipmap
impl UnwindSafe for Clipmap
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