enum
Primitive
pub enum Primitive {
Cube { size: f32 },
Sphere { radius: f32 },
Plane { width: f32, height: f32 },
Torus { radius: f32, tube: f32 },
TorusKnot { radius: f32, tube: f32, p: u16, q: u16 },
Icosphere { radius: f32, detail: u8 },
Cylinder { radius: f32, height: f32 },
Cone { radius: f32, height: f32 },
}A built-in 3D shape, with its dimensions.
Variants
Plane
Plane { width: f32, height: f32 }A flat rectangle (plane) in the XY plane, facing +z, as three.js. width along x and height along y.
TorusKnot
TorusKnot { radius: f32, tube: f32, p: u16, q: u16 }A knot (torus-knot) winding p times around its axis and q times through its hole.
Icosphere
Icosphere { radius: f32, detail: u8 }A sphere made of triangles (icosphere), subdivided detail times (at most 5).