Basic interface for mesh cells consisting of a collection of vertex indices
| 446 | |
| 447 | /// Basic interface for mesh cells consisting of a collection of vertex indices |
| 448 | pub 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)] |
nothing calls this directly
no outgoing calls
no test coverage detected