MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / CellConnectivity

Interface CellConnectivity

splashsurf_lib/src/mesh.rs:448–459  ·  view source on GitHub ↗

Basic interface for mesh cells consisting of a collection of vertex indices

Source from the content-addressed store, hash-verified

446
447/// Basic interface for mesh cells consisting of a collection of vertex indices
448pub trait CellConnectivity {
449 /// Returns the number of vertices per cell (may vary between cells)
450 fn num_vertices(&self) -> usize {
451 Self::expected_num_vertices()
452 }
453 /// Returns the expected number of vertices per cell (helpful for connectivities with a constant or upper bound on the number of vertices to reserve storage)
454 fn expected_num_vertices() -> usize;
455 /// Returns a reference to the vertex indices connected by this cell
456 fn vertices(&self) -> &[usize];
457 /// Returns a reference to the vertex indices connected by this cell
458 fn vertices_mut(&mut self) -> &mut [usize];
459}
460
461/// Cell type for [`TriMesh3d`]
462#[derive(Copy, Clone, Pod, Zeroable)]

Callers

nothing calls this directly

Implementers 1

mesh.rssplashsurf_lib/src/mesh.rs

Calls

no outgoing calls

Tested by

no test coverage detected