pub struct MeshIR {
pub positions: Vec<[f32; 3]>,
pub normals: Vec<[f32; 3]>,
pub uvs: Vec<[f32; 2]>,
pub indices: Vec<u32>,
pub bounds: Aabb,
pub content_hash: u64,
}Expand description
Triangle mesh in fixed buffers (zero growth after fill).
Fields§
§positions: Vec<[f32; 3]>§normals: Vec<[f32; 3]>§uvs: Vec<[f32; 2]>§indices: Vec<u32>Triangle list indices.
bounds: Aabb§content_hash: u64Content hash of positions+indices (FNV-ish mix).
Implementations§
Source§impl MeshIR
impl MeshIR
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
Vertex count.
Sourcepub fn triangle_count(&self) -> usize
pub fn triangle_count(&self) -> usize
Triangle count.
Sourcepub fn recompute_bounds_and_hash(&mut self)
pub fn recompute_bounds_and_hash(&mut self)
Recomputes the AABB and content hash.
Sourcepub fn packed_bytes(&self) -> Vec<u8> ⓘ
pub fn packed_bytes(&self) -> Vec<u8> ⓘ
Compact binary dump of positions+indices for digest (cold).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MeshIR
impl RefUnwindSafe for MeshIR
impl Send for MeshIR
impl Sync for MeshIR
impl Unpin for MeshIR
impl UnsafeUnpin for MeshIR
impl UnwindSafe for MeshIR
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more