[−][src]Struct startin::Triangulation
Methods
impl Triangulation
[src]
pub fn new() -> Triangulation
[src]
pub fn set_snap_tolerance(&mut self, snaptol: f64) -> f64
[src]
Set a snap tolerance when inserting new points: if the newly inserted one is closer than snap_tolerance to another one, then it is not inserted. Avoids having very close vertices (like at 0.00007mm) Default is 0.001unit (thus 1mm for most datasets).
pub fn get_snap_tolerance(&self) -> f64
[src]
pub fn set_jump_and_walk(&mut self, b: bool)
[src]
Activate/deactive the jump-and-walk strategy for locate(). If deactivated, then the walk starts from the last inserted triangle.
pub fn is_using_robust_predicates(&self) -> bool
[src]
pub fn use_robust_predicates(&mut self, b: bool)
[src]
pub fn insert(&mut self, pts: &Vec<Vec<f64>>)
[src]
pub fn insert_one_pt(
&mut self,
px: f64,
py: f64,
pz: f64
) -> Result<usize, usize>
[src]
&mut self,
px: f64,
py: f64,
pz: f64
) -> Result<usize, usize>
pub fn get_point(&self, v: usize) -> Option<Vec<f64>>
[src]
Returns the coordinates of the vertex v in a Vec [x,y,z]
pub fn adjacent_triangles_to_triangle(
&self,
tr: &Triangle
) -> Option<Vec<Triangle>>
[src]
&self,
tr: &Triangle
) -> Option<Vec<Triangle>>
pub fn incident_triangles_to_vertex(&self, v: usize) -> Option<Vec<Triangle>>
[src]
Returns a Vec of Triangles (finite + infinite) to the vertex v.
If v doesn't exist, then None
is returned.
pub fn degree(&self, v: usize) -> Option<usize>
[src]
Returns the degree of a vertex, None
is it doesn't exist.
pub fn adjacent_vertices_to_vertex(&self, v: usize) -> Option<Vec<usize>>
[src]
Returns a list (Vec<usize>
) (ordered CCW) of the adjacent vertices.
None
if the vertex is not part of the triangulation.
pub fn is_triangle(&self, tr: &Triangle) -> bool
[src]
Returns whether a triplet of indices is a Triangle in the triangulation.
pub fn statistics_degree(&self) -> (f64, usize, usize)
[src]
pub fn number_of_vertices(&self) -> usize
[src]
Returns number of finite vertices in the triangulation.
pub fn number_of_triangles(&self) -> usize
[src]
Returns number of finite triangles in the triangulation.
pub fn number_of_removed_vertices(&self) -> usize
[src]
Returns the number of vertices which are marked as "removed"
pub fn is_vertex_removed(&self, v: usize) -> bool
[src]
pub fn convex_hull(&self) -> Vec<usize>
[src]
Returns the convex hull of the dataset, oriented CCW. It is a list of vertex indices (first != last)
pub fn number_of_vertices_on_convex_hull(&self) -> usize
[src]
Returns the size (ie the number of vertices) of the convex hull of the dataset
pub fn is_vertex_convex_hull(&self, v: usize) -> bool
[src]
Returns true if the vertex v is part of the boundary of the convex hull of the dataset. False otherwise.
pub fn locate(&self, px: f64, py: f64) -> Option<Triangle>
[src]
Returns, if it exists, the Triangle containing (px,py). If it is direction on a vertex/edge, then one is randomly chosen.
pub fn closest_point(&self, px: f64, py: f64) -> Option<usize>
[src]
pub fn all_vertices(&self) -> Vec<Vec<f64>>
[src]
Returns a Vec<Vec
pub fn all_edges(&self) -> Vec<usize>
[src]
Returns a <Vec
pub fn all_triangles(&self) -> Vec<Triangle>
[src]
Returns a <Vec
pub fn is_valid(&self) -> bool
[src]
Validates the Delaunay triangulation: (1) checks each triangle against each vertex (circumcircle tests); very slow (2) checks whether the convex hull is really convex
pub fn remove(&mut self, v: usize) -> Result<usize, &'static str>
[src]
pub fn write_obj(&self, path: String, twod: bool) -> Result<()>
[src]
pub fn printme(&self, withxyz: bool) -> String
[src]
Trait Implementations
Auto Trait Implementations
impl Sync for Triangulation
impl Unpin for Triangulation
impl Send for Triangulation
impl UnwindSafe for Triangulation
impl RefUnwindSafe for Triangulation
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,