pub struct Mesh {
pub nodes: Vec<[f64; 3]>,
pub cells: Vec<[usize; 3]>,
}Expand description
Represents a standard 3D mesh.
A Mesh consists of nodes representing points in 3D space,
and cells which are triangles connecting these points.
§Example
let nodes = vec![[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]];
let cells = vec![[0, 1, 2]];
let mesh = Mesh::new(nodes, cells);Fields§
§nodes: Vec<[f64; 3]>§cells: Vec<[usize; 3]>Implementations§
Source§impl Mesh
impl Mesh
Sourcepub fn triangles(&self) -> Vec<[[f64; 3]; 3]>
pub fn triangles(&self) -> Vec<[[f64; 3]; 3]>
Get nodes that make up cell triangles.
See get_mesh_triangles
Sourcepub fn cell_normals(&self) -> Vec<[f64; 3]>
pub fn cell_normals(&self) -> Vec<[f64; 3]>
Get cell normals.
See get_mesh_cell_normals
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mesh
impl RefUnwindSafe for Mesh
impl Send for Mesh
impl Sync for Mesh
impl Unpin 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