pub enum Primitive {
Cuboid {
lo: [f64; 3],
hi: [f64; 3],
},
Cylinder {
base: [f64; 3],
axis: [f64; 3],
radius: f64,
height: f64,
},
HalfSpace {
normal: [f64; 3],
offset: f64,
},
}Expand description
One axis-aligned primitive solid. Lengths in metres.
Variants§
Cuboid
The axis-aligned box [lo, hi] (each lo[k] < hi[k]).
Cylinder
A finite cylinder with flat end caps: the points base + s a + w with
0 <= s <= height and w normal to a, |w| <= radius, where a is
axis normalised.
Fields
HalfSpace
The half-space {p : normal . p <= offset}, with normal its outward
normal. Scaling normal and offset together describes the same
half-space (normalised on build). Unbounded: see the module docs.
Trait Implementations§
impl Copy for Primitive
impl StructuralPartialEq for Primitive
Auto Trait Implementations§
impl Freeze for Primitive
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnsafeUnpin for Primitive
impl UnwindSafe for Primitive
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more