pub struct TriangleMesh {
pub nodes: Vec<[f64; 2]>,
pub triangles: Vec<[usize; 3]>,
}Expand description
A triangle mesh: node coordinates and counter-clockwise (or any consistent) node triples.
Fields§
§nodes: Vec<[f64; 2]>The node coordinates.
triangles: Vec<[usize; 3]>Each triangle’s three node indices.
Implementations§
Source§impl TriangleMesh
impl TriangleMesh
Sourcepub fn rectangle(width: f64, height: f64, nx: usize, ny: usize) -> Self
pub fn rectangle(width: f64, height: f64, nx: usize, ny: usize) -> Self
The rectangle [0, width] × [0, height] divided into nx × ny cells, each split into two
triangles. Node (i, j) has index j (nx + 1) + i.
Sourcepub fn box_boundary_nodes(&self) -> Vec<usize>
pub fn box_boundary_nodes(&self) -> Vec<usize>
Indices of nodes on the boundary of the bounding box (for rectangle meshes, the boundary).
Trait Implementations§
Source§impl Clone for TriangleMesh
impl Clone for TriangleMesh
Auto Trait Implementations§
impl Freeze for TriangleMesh
impl RefUnwindSafe for TriangleMesh
impl Send for TriangleMesh
impl Sync for TriangleMesh
impl Unpin for TriangleMesh
impl UnsafeUnpin for TriangleMesh
impl UnwindSafe for TriangleMesh
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