pub struct WorldPartition<S: CellSource> { /* private fields */ }Expand description
Kopflose, deterministische Welt-Partition (siehe Modul-Doku).
Implementations§
Source§impl<S: CellSource> WorldPartition<S>
impl<S: CellSource> WorldPartition<S>
pub fn new(cfg: PartitionConfig, source: S) -> Self
pub fn config(&self) -> &PartitionConfig
pub fn clipmap(&self) -> &Clipmap
pub fn streamer(&self) -> &Streamer<S>
Sourcepub fn enable_hlod(&mut self, cfg: HlodConfig)
pub fn enable_hlod(&mut self, cfg: HlodConfig)
HLOD mit anderer Übernahmezone/anderem Raster neu aufsetzen — der Bestand startet versteckt (der Bake wird danach eingetragen).
Sourcepub fn hlod_mut(&mut self) -> &mut HlodSet
pub fn hlod_mut(&mut self) -> &mut HlodSet
Bake-Nachschub: Cluster registrieren/entfernen, ohne die Zone zu ändern.
pub fn instances(&self) -> &[Instance]
Sourcepub fn spawn(&mut self, position: Vec2, camera: Option<Vec2>) -> usize
pub fn spawn(&mut self, position: Vec2, camera: Option<Vec2>) -> usize
Instanz hinzufügen; die Startstufe kommt sofort aus der
Distanz zu camera (ohne Kamera-Angabe startet sie bei T4).
Sourcepub fn despawn(&mut self, id: usize) -> Option<Instance>
pub fn despawn(&mut self, id: usize) -> Option<Instance>
Instanz entfernen. Achtung: remove verschiebt den letzten
Eintrag nach id — alle Indizes > id wandern um eins zurück.
Auto Trait Implementations§
impl<S> Freeze for WorldPartition<S>where
S: Freeze,
impl<S> RefUnwindSafe for WorldPartition<S>where
S: RefUnwindSafe,
impl<S> Send for WorldPartition<S>where
S: Send,
impl<S> Sync for WorldPartition<S>where
S: Sync,
impl<S> Unpin for WorldPartition<S>where
S: Unpin,
impl<S> UnsafeUnpin for WorldPartition<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for WorldPartition<S>where
S: UnwindSafe,
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