pub struct Mesh {
pub positions: Vec<f64>,
pub normals: Vec<f64>,
pub indices: Vec<u32>,
pub face_ids: Vec<u32>,
}Fields§
§positions: Vec<f64>§normals: Vec<f64>§indices: Vec<u32>§face_ids: Vec<u32>Implementations§
Source§impl Mesh
impl Mesh
pub fn signed_volume(&self) -> f64
pub fn validate(&self) -> Result<(), String>
Sourcepub fn validate_geometry(&self) -> Result<(), String>
pub fn validate_geometry(&self) -> Result<(), String>
Geometry-only validation for consumers that use positions + indices but
NOT normals (e.g. signed_volume, whose tetrahedron sum never reads a
normal). Mesh-only solids such as sheet-metal bodies supply metrics
meshes with an empty normal buffer, which is legitimate for volume.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mesh
impl<'de> Deserialize<'de> for Mesh
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
Auto Trait Implementations§
impl Freeze for Mesh
impl RefUnwindSafe for Mesh
impl Send for Mesh
impl Sync for Mesh
impl Unpin for Mesh
impl UnsafeUnpin for Mesh
impl UnwindSafe for Mesh
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