pub enum RtPrimitiveShape {
Sphere {
center: Vec3,
radius: f32,
},
Plane {
point: Vec3,
normal: Vec3,
},
Box {
min: Vec3,
max: Vec3,
},
Disk {
center: Vec3,
normal: Vec3,
radius: f32,
},
Quad {
corner: Vec3,
edge_u: Vec3,
edge_v: Vec3,
},
Cylinder {
center: Vec3,
radius: f32,
half_height: f32,
capped: bool,
},
}Expand description
Analytic geometric primitive intersected directly without triangle tessellation.
Variants§
Sphere
Solid sphere centered at center with positive radius.
Plane
Infinite plane passing through point with unit outward normal.
Box
Axis-aligned solid box bounded by [min, max].
Disk
Planar circular disk centered at center with unit normal and radius.
Fields
Quad
Parallelogram or rectangular quad defined by corner and spanning edges edge_u and edge_v.
Fields
Cylinder
Y-axis aligned finite cylinder centered at center with radius, half_height, and optional endcaps.
Trait Implementations§
Source§impl Clone for RtPrimitiveShape
impl Clone for RtPrimitiveShape
impl Copy for RtPrimitiveShape
Source§impl Debug for RtPrimitiveShape
impl Debug for RtPrimitiveShape
Source§impl PartialEq for RtPrimitiveShape
impl PartialEq for RtPrimitiveShape
impl StructuralPartialEq for RtPrimitiveShape
Auto Trait Implementations§
impl Forget for RtPrimitiveShape
impl Freeze for RtPrimitiveShape
impl Move for RtPrimitiveShape
impl RefUnwindSafe for RtPrimitiveShape
impl Send for RtPrimitiveShape
impl Sync for RtPrimitiveShape
impl Unpin for RtPrimitiveShape
impl UnsafeUnpin for RtPrimitiveShape
impl UnwindSafe for RtPrimitiveShape
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