pub enum SceneNode {
Leaf(PrimitiveKind),
Union(Box<SceneNode>, Box<SceneNode>),
Intersection(Box<SceneNode>, Box<SceneNode>),
Difference(Box<SceneNode>, Box<SceneNode>),
SmoothUnion {
k: f32,
left: Box<SceneNode>,
right: Box<SceneNode>,
},
}Variants§
Leaf(PrimitiveKind)
Union(Box<SceneNode>, Box<SceneNode>)
Intersection(Box<SceneNode>, Box<SceneNode>)
Difference(Box<SceneNode>, Box<SceneNode>)
max(left, -right): the right subtree is carved from the left.
SmoothUnion
k is the blend radius in Space units.
Implementations§
Source§impl SceneNode
impl SceneNode
pub fn sphere(center: Vec3, radius: f32) -> Self
Sourcepub fn plane(normal: Vec3, offset: f32) -> Self
pub fn plane(normal: Vec3, offset: f32) -> Self
Emits chart-coord dot(p, n) - d in flat charts and super::SENTINEL_DISTANCE in curved ones.
pub fn box_(half_extents: Vec3) -> Self
pub fn cube(half_side: f32) -> Self
pub fn union(self, other: SceneNode) -> Self
pub fn intersect(self, other: SceneNode) -> Self
pub fn subtract(self, other: SceneNode) -> Self
pub fn smooth_union(self, other: SceneNode, k: f32) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SceneNode
impl RefUnwindSafe for SceneNode
impl Send for SceneNode
impl Sync for SceneNode
impl Unpin for SceneNode
impl UnsafeUnpin for SceneNode
impl UnwindSafe for SceneNode
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