pub struct CellArray { /* private fields */ }Expand description
Storage for cell topology using offsets + connectivity arrays.
Uses Arc<Vec
Implementations§
Source§impl CellArray
impl CellArray
pub fn new() -> Self
Sourcepub fn from_raw(offsets: Vec<i64>, connectivity: Vec<i64>) -> Self
pub fn from_raw(offsets: Vec<i64>, connectivity: Vec<i64>) -> Self
Create a CellArray from raw offsets and connectivity.
Sourcepub fn from_triangles(tris: &[[i64; 3]]) -> Self
pub fn from_triangles(tris: &[[i64; 3]]) -> Self
Create a CellArray from triangle index arrays.
Sourcepub fn from_quads(quads: &[[i64; 4]]) -> Self
pub fn from_quads(quads: &[[i64; 4]]) -> Self
Create a CellArray from quad index arrays.
pub fn num_cells(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn offsets(&self) -> &[i64]
pub fn connectivity(&self) -> &[i64]
Sourcepub fn connectivity_len(&self) -> usize
pub fn connectivity_len(&self) -> usize
Total number of point index entries across all cells.
pub fn clear(&mut self)
Sourcepub fn cell_sizes(&self) -> impl Iterator<Item = usize> + '_
pub fn cell_sizes(&self) -> impl Iterator<Item = usize> + '_
Iterator over cell sizes (number of points per cell).
Sourcepub fn max_cell_size(&self) -> usize
pub fn max_cell_size(&self) -> usize
Maximum cell size (max number of points in any cell).
Sourcepub fn is_homogeneous(&self) -> Option<usize>
pub fn is_homogeneous(&self) -> Option<usize>
Check if all cells have the same size.
Trait Implementations§
Source§impl<'a> IntoIterator for &'a CellArray
impl<'a> IntoIterator for &'a CellArray
Auto Trait Implementations§
impl Freeze for CellArray
impl RefUnwindSafe for CellArray
impl Send for CellArray
impl Sync for CellArray
impl Unpin for CellArray
impl UnsafeUnpin for CellArray
impl UnwindSafe for CellArray
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more