Trait spade::FloatTriangulation
source · pub trait FloatTriangulation: Triangulation{
// Provided methods
fn get_edges_in_rectangle(
&self,
lower: Point2<<Self::Vertex as HasPosition>::Scalar>,
upper: Point2<<Self::Vertex as HasPosition>::Scalar>
) -> EdgesInShapeIterator<'_, Self, RectangleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ { ... }
fn get_edges_in_circle(
&self,
center: Point2<<Self::Vertex as HasPosition>::Scalar>,
radius_2: <Self::Vertex as HasPosition>::Scalar
) -> EdgesInShapeIterator<'_, Self, CircleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ { ... }
fn get_vertices_in_rectangle(
&self,
lower: Point2<<Self::Vertex as HasPosition>::Scalar>,
upper: Point2<<Self::Vertex as HasPosition>::Scalar>
) -> VerticesInShapeIterator<'_, Self, RectangleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ { ... }
fn get_vertices_in_circle(
&self,
center: Point2<<Self::Vertex as HasPosition>::Scalar>,
radius_2: <Self::Vertex as HasPosition>::Scalar
) -> VerticesInShapeIterator<'_, Self, CircleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ { ... }
fn barycentric(&self) -> Barycentric<'_, Self> { ... }
}
Expand description
Implements general functions for triangulations over floating point data types.
This trait is implemented for any triangulation (constrained and regular Delaunay triangulations)
over f32
and f64
.
Provided Methods§
sourcefn get_edges_in_rectangle(
&self,
lower: Point2<<Self::Vertex as HasPosition>::Scalar>,
upper: Point2<<Self::Vertex as HasPosition>::Scalar>
) -> EdgesInShapeIterator<'_, Self, RectangleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ
fn get_edges_in_rectangle( &self, lower: Point2<<Self::Vertex as HasPosition>::Scalar>, upper: Point2<<Self::Vertex as HasPosition>::Scalar> ) -> EdgesInShapeIterator<'_, Self, RectangleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ
Returns all edges contained in a rectangle.
An edge is considered to be contained in the rectangle if at least one point exists that is both on the edge and inside the rectangle (including its boundary).
The rectangle is specified by its lower and upper corners. Yields an empty iterator
if lower.x > upper.x
or lower.y > upper.y
.
Example: Shows all edges (red) that are returned when iterating over a rectangle (teal)
§Memory consumption
Memory usage is, on average, in O(|convex_hull(E)|) where “E” refers to all edges that have been returned so far.
sourcefn get_edges_in_circle(
&self,
center: Point2<<Self::Vertex as HasPosition>::Scalar>,
radius_2: <Self::Vertex as HasPosition>::Scalar
) -> EdgesInShapeIterator<'_, Self, CircleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ
fn get_edges_in_circle( &self, center: Point2<<Self::Vertex as HasPosition>::Scalar>, radius_2: <Self::Vertex as HasPosition>::Scalar ) -> EdgesInShapeIterator<'_, Self, CircleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ
Returns all edges contained in a circle.
An edge is considered to be contained in a circle if at least one point exists that is both on the edge and within the circle (including its boundary).
radius_2
refers to the squared radius of the circle.
Example: Shows all edges (red) that are returned when iterating over a circle (teal)
§Panics
Panics if radius_2 < 0.0
§Memory consumption
Memory usage is, on average, in O(|convex_hull(E)|) where “E” refers to all edges that have been returned so far.
sourcefn get_vertices_in_rectangle(
&self,
lower: Point2<<Self::Vertex as HasPosition>::Scalar>,
upper: Point2<<Self::Vertex as HasPosition>::Scalar>
) -> VerticesInShapeIterator<'_, Self, RectangleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ
fn get_vertices_in_rectangle( &self, lower: Point2<<Self::Vertex as HasPosition>::Scalar>, upper: Point2<<Self::Vertex as HasPosition>::Scalar> ) -> VerticesInShapeIterator<'_, Self, RectangleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ
Returns all vertices in a rectangle.
Any vertex on the rectangle’s boundary or corners is also returned.
The rectangle is specified by its lower and upper corners. Yields an empty iterator
if lower.x > upper.x || lower.y > upper.y
.
Example: Shows all vertices (red) that are returned when iterating over a rectangle (teal)
§Memory consumption
Consumed memory is in O(|convex_hull(V)|)
where V
refers to all vertices that have been
returned so far.
sourcefn get_vertices_in_circle(
&self,
center: Point2<<Self::Vertex as HasPosition>::Scalar>,
radius_2: <Self::Vertex as HasPosition>::Scalar
) -> VerticesInShapeIterator<'_, Self, CircleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ
fn get_vertices_in_circle( &self, center: Point2<<Self::Vertex as HasPosition>::Scalar>, radius_2: <Self::Vertex as HasPosition>::Scalar ) -> VerticesInShapeIterator<'_, Self, CircleMetric<<Self::Vertex as HasPosition>::Scalar>> ⓘ
Returns all vertices in a circle.
Any vertex on the circle’s boundary is also returned.
radius_2
refers to the squared radius of the circle.
Example: Shows all vertices (red) that are returned when iterating over a circle (teal)
§Panics
Panics if radius_2 < 0.0
§Memory consumption
Consumed memory is in O(|convex_hull(V)|)
where V
refers to all vertices that have been
returned so far.
sourcefn barycentric(&self) -> Barycentric<'_, Self>
fn barycentric(&self) -> Barycentric<'_, Self>
Used for barycentric interpolation on this triangulation. Refer to the documentation of Barycentric and crate::NaturalNeighbor for more information.
Note: In contrast to the other interpolation algorithms, barycentric interpolation also works for crate::ConstrainedDelaunayTriangulations.