pub struct Clipmap {
pub cfg: ClipCfg,
pub anchor: V3,
pub dist: Vec<Vec<f32>>,
pub ids: Vec<Vec<u32>>,
}Expand description
Das kompostierte Feld. dist[l] und ids[l] teilen das
Zeilenmajor-Layout ((z·res + y)·res + x).
Fields§
§cfg: ClipCfg§anchor: V3§dist: Vec<Vec<f32>>§ids: Vec<Vec<u32>>Implementations§
Source§impl Clipmap
impl Clipmap
Sourcepub fn texel_of(&self, p: V3, l: u32) -> [u32; 3]
pub fn texel_of(&self, p: V3, l: u32) -> [u32; 3]
Toroidales Texturel von p auf Level l: Rohkoordinaten
(p − anchor)/v + res/2, Quantisierung per qidx, Modulo
res. Anker-Schritte ganzer Voxel verschieben nur das Rohr.
Sourcepub fn covers(&self, p: V3, l: u32) -> bool
pub fn covers(&self, p: V3, l: u32) -> bool
Deckt Level l die Weltposition? Randkonvention:
Roh ∈ [−halbe Kante, halbe Kante) — der Rand selbst gehört
schon zum Nachbar-Voxel des nächsten Umlaufs.
Sourcepub fn sample(&self, p: V3) -> (f32, u32)
pub fn sample(&self, p: V3) -> (f32, u32)
Nächste (feinste) Level-Abfrage, die p deckt; außerhalb des
gröbsten Fußabdrucks ohne Wissen: (MDF_START, NO_SRC).
Sourcepub fn compose(anchor: V3, cfg: ClipCfg, sources: &[ClipSource<'_>]) -> Self
pub fn compose(anchor: V3, cfg: ClipCfg, sources: &[ClipSource<'_>]) -> Self
Das Weltfeld um den Anker bauen: je Level je Texturel-Mittelpunkt
die Mindest-Distanz aller Quellen (Verschiebung at),
Gleichstand entscheidet die kleinere Quellennummer.
Trait Implementations§
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