pub enum PrimitiveKind {
Box {
length: f64,
width: f64,
height: f64,
},
Cylinder {
radius: f64,
height: f64,
angle_deg: f64,
},
Sphere {
radius: f64,
angle1_deg: f64,
angle2_deg: f64,
angle3_deg: f64,
},
Cone {
radius1: f64,
radius2: f64,
height: f64,
angle_deg: f64,
},
Torus {
radius1: f64,
radius2: f64,
angle1_deg: f64,
angle2_deg: f64,
angle3_deg: f64,
},
Ellipsoid {
radius1: f64,
radius2: f64,
radius3: f64,
angle1_deg: f64,
angle2_deg: f64,
angle3_deg: f64,
},
Prism {
sides: u32,
circumradius: f64,
height: f64,
skew_x_deg: f64,
skew_y_deg: f64,
},
Tube {
outer: f64,
inner: f64,
height: f64,
},
Wedge {
xmin: f64,
xmax: f64,
ymin: f64,
ymax: f64,
zmin: f64,
zmax: f64,
x2min: f64,
x2max: f64,
z2min: f64,
z2max: f64,
},
}Expand description
Parametric primitive shapes (dimensions in millimetres, angles degrees).
Variants§
Box
Cylinder
Sphere
Fields
Cone
Torus
Ellipsoid
An ellipsoid, cut as a sphere is: between two latitudes about its third axis and through a sweep round it.
Prism
A regular prism, its top shifted by the skew angles: leaning that far from its axis toward its x and its y.
Tube
A hollow cylinder: a wall between the radii inner and outer
about its axis, height tall. The inner radius is above zero and
below the outer.
Wedge
Box with an independently sized top rectangle (zero top spans give a
pyramid). Spans are along local X (x2*) and Z (z2*) at height Y.
Trait Implementations§
Source§impl Clone for PrimitiveKind
impl Clone for PrimitiveKind
impl Copy for PrimitiveKind
Source§impl Debug for PrimitiveKind
impl Debug for PrimitiveKind
Source§impl<'de> Deserialize<'de> for PrimitiveKind
impl<'de> Deserialize<'de> for PrimitiveKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PrimitiveKind
impl PartialEq for PrimitiveKind
Source§impl Serialize for PrimitiveKind
impl Serialize for PrimitiveKind
impl StructuralPartialEq for PrimitiveKind
Auto Trait Implementations§
impl Forget for PrimitiveKind
impl Freeze for PrimitiveKind
impl RefUnwindSafe for PrimitiveKind
impl Send for PrimitiveKind
impl Sync for PrimitiveKind
impl Unpin for PrimitiveKind
impl UnsafeUnpin for PrimitiveKind
impl UnwindSafe for PrimitiveKind
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