pub struct RabbitMesh {
pub positions: Vec<[f32; 3]>,
pub normals: Vec<[f32; 3]>,
pub indices: Vec<u32>,
}Expand description
A triangle-soup mesh of the extruded rabbit logo: interleaved positions +
normals, indexed. Coordinates are in the [-1, 1] design box (y up) with the
extrusion along z (±depth/2). Pure data — the renderer (wgpu or the CPU
fallback) projects + lights it.
Fields§
§positions: Vec<[f32; 3]>(x, y, z) per vertex.
normals: Vec<[f32; 3]>Unit normal per vertex (parallel to positions).
indices: Vec<u32>Triangle indices (3 per face) into positions.
Implementations§
Source§impl RabbitMesh
impl RabbitMesh
pub fn vertex_count(&self) -> usize
pub fn triangle_count(&self) -> usize
Trait Implementations§
Source§impl Clone for RabbitMesh
impl Clone for RabbitMesh
Source§fn clone(&self) -> RabbitMesh
fn clone(&self) -> RabbitMesh
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RabbitMesh
impl Debug for RabbitMesh
Source§impl Default for RabbitMesh
impl Default for RabbitMesh
Source§fn default() -> RabbitMesh
fn default() -> RabbitMesh
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RabbitMesh
impl RefUnwindSafe for RabbitMesh
impl Send for RabbitMesh
impl Sync for RabbitMesh
impl Unpin for RabbitMesh
impl UnsafeUnpin for RabbitMesh
impl UnwindSafe for RabbitMesh
Blanket Implementations§
impl<T> Allocation for T
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