pub enum Geometry3D {
Box {
width: f32,
height: f32,
depth: f32,
},
Sphere {
radius: f32,
width_segments: u32,
height_segments: u32,
},
Plane {
width: f32,
height: f32,
},
Cylinder {
radius_top: f32,
radius_bottom: f32,
height: f32,
radial_segments: u32,
},
Custom {
vertices: Vec<f32>,
indices: Vec<u32>,
},
CustomTextured {
vertices: Vec<f32>,
indices: Vec<u32>,
},
}Expand description
3D Geometry: Supports both parametric Three.js-style primitives and low-level custom vertex buffers.
Variants§
Box
Sphere
Plane
Cylinder
Custom
CustomTextured
Custom vertex buffer with explicit texture coordinates.
vertices is an eight-float stride: x, y, z, nx, ny, nz, u, v. Use this
for tile quads, relief walls, and building prisms whose UVs are authored
per corner rather than derived from the primitive generator.
Trait Implementations§
Source§impl Clone for Geometry3D
impl Clone for Geometry3D
Source§impl Debug for Geometry3D
impl Debug for Geometry3D
Source§impl PartialEq for Geometry3D
impl PartialEq for Geometry3D
impl StructuralPartialEq for Geometry3D
Auto Trait Implementations§
impl Forget for Geometry3D
impl Freeze for Geometry3D
impl Move for Geometry3D
impl RefUnwindSafe for Geometry3D
impl Send for Geometry3D
impl Sync for Geometry3D
impl Unpin for Geometry3D
impl UnsafeUnpin for Geometry3D
impl UnwindSafe for Geometry3D
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