pub struct Prim {
pub prim: String,
pub at: [f32; 3],
pub rot: f32,
pub r: f32,
pub size: Option<[f32; 3]>,
pub h: f32,
pub r2: f32,
pub rounded: f32,
pub axis: String,
}Expand description
A primitive: sphere (r) · box (size, rounded) · cylinder (r, h) ·
capsule (r, h) · cone (r → r2 over h) · torus (r major, r2 minor).
Fields§
§prim: String§at: [f32; 3]Centre offset in the parent’s frame.
rot: f32Y-rotation, degrees.
r: f32Primary radius (sphere/cylinder/capsule/cone/torus major).
size: Option<[f32; 3]>Box full extents.
h: f32Height (cylinder/capsule/cone) — full, not half.
r2: f32Secondary radius (cone top; torus minor). Cone default 0 = a point.
rounded: f32Corner rounding (box).
axis: StringLong axis for cylinder/capsule/cone/torus: "y" (default), "x", "z".
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Prim
impl<'de> Deserialize<'de> for Prim
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
impl StructuralPartialEq for Prim
Auto Trait Implementations§
impl Freeze for Prim
impl RefUnwindSafe for Prim
impl Send for Prim
impl Sync for Prim
impl Unpin for Prim
impl UnsafeUnpin for Prim
impl UnwindSafe for Prim
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