pub struct Triangulation { /* private fields */ }
Expand description
Triangulation
Uses the dD triangulation package from CGAL internally.
Implementations§
Source§impl Triangulation
impl Triangulation
Sourcepub fn new(dim: usize) -> Triangulation
pub fn new(dim: usize) -> Triangulation
Create new triangulation for vertices of size/dimension dim
Sourcepub fn add_vertex(
&mut self,
coords: &[f64],
) -> Result<usize, TriangulationError>
pub fn add_vertex( &mut self, coords: &[f64], ) -> Result<usize, TriangulationError>
Add vertex to the triangulation.
The operation fails if coords
has the wrong dimension.
Sourcepub unsafe fn add_vertex_unchecked(&mut self, coords: &[f64]) -> usize
pub unsafe fn add_vertex_unchecked(&mut self, coords: &[f64]) -> usize
Add vertex to triangulation without veryfing the dimension
§Safety
If the dimension of coords
is too small undefined behavior might be triggered on the c++ side.
If the dimension of coords
is too large only the first dim
values will be considered.
Sourcepub fn convex_hull_cells(&mut self) -> CellIter<'_> ⓘ
pub fn convex_hull_cells(&mut self) -> CellIter<'_> ⓘ
Returns a iterator over all convex hull cells/facets.
This allocates a vector with cell handles internally and is not implemented in the typical streaming fashion of rust iterators.
Trait Implementations§
Source§impl Debug for Triangulation
impl Debug for Triangulation
Source§impl Drop for Triangulation
impl Drop for Triangulation
Source§impl PartialEq for Triangulation
impl PartialEq for Triangulation
impl Eq for Triangulation
impl StructuralPartialEq for Triangulation
Auto Trait Implementations§
impl Freeze for Triangulation
impl RefUnwindSafe for Triangulation
impl !Send for Triangulation
impl !Sync for Triangulation
impl Unpin for Triangulation
impl UnwindSafe for Triangulation
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