pub struct SdfScene {
pub prims: Vec<SdfPrim>,
}Expand description
Die Szene: Primitive in Weltkoordinaten, Abstand ist ihr Minimum.
Fields§
§prims: Vec<SdfPrim>Implementations§
Source§impl SdfScene
impl SdfScene
pub fn new() -> Self
pub fn from_prims(prims: Vec<SdfPrim>) -> Self
pub fn add(&mut self, p: SdfPrim) -> u32
Sourcepub fn dist(&self, p: V3) -> (f32, u32)
pub fn dist(&self, p: V3) -> (f32, u32)
Minimum der Abstandsfolge über alle Primitive plus dessen Index.
Der Index zählt 1-basiert (0 = kein Primitiv) — direkt der
Speichervertrag mit sdf.wgsl. Die Hüllkugel leitet nur ab,
dessen wahrer Abstand den bisherigen Bestwert nicht schlagen kann;
das Ergebnis bleibt das reine Minimum.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SdfScene
impl RefUnwindSafe for SdfScene
impl Send for SdfScene
impl Sync for SdfScene
impl Unpin for SdfScene
impl UnsafeUnpin for SdfScene
impl UnwindSafe for SdfScene
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