pub struct Triangle<T = f64>(pub Coord<T>, pub Coord<T>, pub Coord<T>)
where
T: CoordNum;Expand description
A bounded 2D area whose three vertices are defined by
Coords. The semantics and validity are that of
the equivalent Polygon; in addition, the three
vertices must not be collinear and they must be distinct.
§Notes
Irrespective of input order the resulting geometry has ccw order and its vertices are yielded in ccw order by iterators
Tuple Fields§
§0: Coord<T>§1: Coord<T>§2: Coord<T>Implementations§
Source§impl<T> Triangle<T>where
T: CoordNum,
impl<T> Triangle<T>where
T: CoordNum,
Sourcepub fn new(v1: Coord<T>, v2: Coord<T>, v3: Coord<T>) -> Triangle<T>
pub fn new(v1: Coord<T>, v2: Coord<T>, v3: Coord<T>) -> Triangle<T>
Instantiate Self from the raw content value
pub fn to_array(&self) -> [Coord<T>; 3]
pub fn to_lines(&self) -> [Line<T>; 3]
Sourcepub fn to_polygon(self) -> Polygon<T>
pub fn to_polygon(self) -> Polygon<T>
Create a Polygon from the Triangle.
§Examples
use geo_types::{coord, Triangle, polygon};
// Input is CW
let triangle = Triangle::new(
coord! { x: 0., y: 0. },
coord! { x: 10., y: 20. },
coord! { x: 20., y: -10. },
);
// Output is CCW
assert_eq!(
triangle.to_polygon(),
polygon![
(x: 20., y: -10.),
(x: 10., y: 20.),
(x: 0., y: 0.),
(x: 20., y: -10.),
],
);Trait Implementations§
Source§impl<T> AbsDiffEq for Triangle<T>
impl<T> AbsDiffEq for Triangle<T>
Source§fn abs_diff_eq(
&self,
other: &Triangle<T>,
epsilon: <Triangle<T> as AbsDiffEq>::Epsilon,
) -> bool
fn abs_diff_eq( &self, other: &Triangle<T>, epsilon: <Triangle<T> as AbsDiffEq>::Epsilon, ) -> bool
Equality assertion with an absolute limit.
§Examples
use geo_types::{point, Triangle};
let a = Triangle::new((0.0, 0.0).into(), (10.0, 10.0).into(), (0.0, 5.0).into());
let b = Triangle::new((0.0, 0.0).into(), (10.01, 10.0).into(), (0.0, 5.0).into());
approx::abs_diff_eq!(a, b, epsilon=0.1);
approx::abs_diff_ne!(a, b, epsilon=0.001);Source§fn default_epsilon() -> <Triangle<T> as AbsDiffEq>::Epsilon
fn default_epsilon() -> <Triangle<T> as AbsDiffEq>::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq.Source§impl<T> Area<T> for Triangle<T>where
T: CoordFloat,
impl<T> Area<T> for Triangle<T>where
T: CoordFloat,
fn signed_area(&self) -> T
fn unsigned_area(&self) -> T
Source§impl<T> BoundingRect<T> for Triangle<T>where
T: CoordNum,
impl<T> BoundingRect<T> for Triangle<T>where
T: CoordNum,
Source§impl<F: BoolOpsNum + 'static> Buffer for Triangle<F>
impl<F: BoolOpsNum + 'static> Buffer for Triangle<F>
type Scalar = F
Source§fn buffer_with_style(
&self,
style: BufferStyle<Self::Scalar>,
) -> MultiPolygon<Self::Scalar>
fn buffer_with_style( &self, style: BufferStyle<Self::Scalar>, ) -> MultiPolygon<Self::Scalar>
Source§impl<T> Centroid for Triangle<T>where
T: GeoFloat,
impl<T> Centroid for Triangle<T>where
T: GeoFloat,
Source§impl<T> ChamberlainDuquetteArea<T> for Triangle<T>where
T: CoordFloat,
impl<T> ChamberlainDuquetteArea<T> for Triangle<T>where
T: CoordFloat,
fn chamberlain_duquette_signed_area(&self) -> T
fn chamberlain_duquette_unsigned_area(&self) -> T
Source§impl<F: GeoFloat> ClosestPoint<F> for Triangle<F>
impl<F: GeoFloat> ClosestPoint<F> for Triangle<F>
Source§fn closest_point(&self, p: &Point<F>) -> Closest<F>
fn closest_point(&self, p: &Point<F>) -> Closest<F>
Find the closest point between
self and p.Source§impl<T> Contains<GeometryCollection<T>> for Triangle<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for Triangle<T>where
T: GeoFloat,
fn contains(&self, target: &GeometryCollection<T>) -> bool
Source§impl<T> Contains<LineString<T>> for Triangle<T>where
T: GeoFloat,
impl<T> Contains<LineString<T>> for Triangle<T>where
T: GeoFloat,
fn contains(&self, target: &LineString<T>) -> bool
Source§impl<T> Contains<MultiLineString<T>> for Triangle<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for Triangle<T>where
T: GeoFloat,
fn contains(&self, target: &MultiLineString<T>) -> bool
Source§impl<T> Contains<MultiPoint<T>> for Triangle<T>where
T: GeoFloat,
impl<T> Contains<MultiPoint<T>> for Triangle<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPoint<T>) -> bool
Source§impl<T> Contains<MultiPolygon<T>> for Triangle<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for Triangle<T>where
T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
Source§impl<T> ContainsProperly<Geometry<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<Geometry<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, geometry: &Geometry<T>) -> bool
Source§impl<T> ContainsProperly<GeometryCollection<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<GeometryCollection<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &GeometryCollection<T>) -> bool
Source§impl<T> ContainsProperly<Line<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<Line<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Line<T>) -> bool
Source§impl<T> ContainsProperly<LineString<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<LineString<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &LineString<T>) -> bool
Source§impl<T> ContainsProperly<MultiLineString<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<MultiLineString<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &MultiLineString<T>) -> bool
Source§impl<T> ContainsProperly<MultiPoint<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<MultiPoint<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &MultiPoint<T>) -> bool
Source§impl<T> ContainsProperly<MultiPolygon<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<MultiPolygon<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &MultiPolygon<T>) -> bool
Source§impl<T> ContainsProperly<Point<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<Point<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Point<T>) -> bool
Source§impl<T> ContainsProperly<Polygon<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<Polygon<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Polygon<T>) -> bool
Source§impl<T> ContainsProperly<Rect<T>> for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly<Rect<T>> for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Rect<T>) -> bool
Source§impl<T> ContainsProperly<Triangle<T>> for GeometryCollection<T>where
T: GeoFloat,
impl<T> ContainsProperly<Triangle<T>> for GeometryCollection<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Triangle<T>) -> bool
Source§impl<T> ContainsProperly<Triangle<T>> for Line<T>where
T: GeoFloat,
impl<T> ContainsProperly<Triangle<T>> for Line<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Triangle<T>) -> bool
Source§impl<T> ContainsProperly<Triangle<T>> for LineString<T>where
T: GeoFloat,
impl<T> ContainsProperly<Triangle<T>> for LineString<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Triangle<T>) -> bool
Source§impl<T> ContainsProperly<Triangle<T>> for MultiLineString<T>where
T: GeoFloat,
impl<T> ContainsProperly<Triangle<T>> for MultiLineString<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Triangle<T>) -> bool
Source§impl<T> ContainsProperly<Triangle<T>> for MultiPoint<T>where
T: GeoFloat,
impl<T> ContainsProperly<Triangle<T>> for MultiPoint<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Triangle<T>) -> bool
Source§impl<T> ContainsProperly<Triangle<T>> for MultiPolygon<T>where
T: GeoNum,
impl<T> ContainsProperly<Triangle<T>> for MultiPolygon<T>where
T: GeoNum,
fn contains_properly(&self, rhs: &Triangle<T>) -> bool
Source§impl<T> ContainsProperly<Triangle<T>> for Point<T>where
T: GeoFloat,
impl<T> ContainsProperly<Triangle<T>> for Point<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Triangle<T>) -> bool
Source§impl<T> ContainsProperly<Triangle<T>> for Polygon<T>where
T: GeoNum,
impl<T> ContainsProperly<Triangle<T>> for Polygon<T>where
T: GeoNum,
fn contains_properly(&self, rhs: &Triangle<T>) -> bool
Source§impl<T> ContainsProperly<Triangle<T>> for Rect<T>where
T: GeoFloat,
impl<T> ContainsProperly<Triangle<T>> for Rect<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Triangle<T>) -> bool
Source§impl<T> ContainsProperly for Triangle<T>where
T: GeoFloat,
impl<T> ContainsProperly for Triangle<T>where
T: GeoFloat,
fn contains_properly(&self, target: &Triangle<T>) -> bool
Source§impl<T> CoordinatePosition for Triangle<T>where
T: GeoNum,
impl<T> CoordinatePosition for Triangle<T>where
T: GeoNum,
Source§impl<T: CoordNum> CoordsIter for Triangle<T>
impl<T: CoordNum> CoordsIter for Triangle<T>
Source§fn coords_count(&self) -> usize
fn coords_count(&self) -> usize
Return the number of coordinates in the Triangle.
type Iter<'a> = Chain<Chain<Once<Coord<T>>, Once<Coord<T>>>, Once<Coord<T>>> where T: 'a
type ExteriorIter<'a> = <Triangle<T> as CoordsIter>::Iter<'a> where T: 'a
type Scalar = T
Source§fn coords_iter(&self) -> Self::Iter<'_>
fn coords_iter(&self) -> Self::Iter<'_>
Iterate over all exterior and (if any) interior coordinates of a geometry. Read more
Source§fn exterior_coords_iter(&self) -> Self::ExteriorIter<'_>
fn exterior_coords_iter(&self) -> Self::ExteriorIter<'_>
Iterate over all exterior coordinates of a geometry. Read more
Source§impl<T> Covers<GeometryCollection<T>> for Triangle<T>
impl<T> Covers<GeometryCollection<T>> for Triangle<T>
fn covers(&self, target: &GeometryCollection<T>) -> bool
Source§impl<T> Covers<LineString<T>> for Triangle<T>
impl<T> Covers<LineString<T>> for Triangle<T>
fn covers(&self, target: &LineString<T>) -> bool
Source§impl<T> Covers<MultiLineString<T>> for Triangle<T>
impl<T> Covers<MultiLineString<T>> for Triangle<T>
fn covers(&self, target: &MultiLineString<T>) -> bool
Source§impl<T> Covers<MultiPoint<T>> for Triangle<T>
impl<T> Covers<MultiPoint<T>> for Triangle<T>
fn covers(&self, target: &MultiPoint<T>) -> bool
Source§impl<T> Covers<MultiPolygon<T>> for Triangle<T>
impl<T> Covers<MultiPolygon<T>> for Triangle<T>
fn covers(&self, target: &MultiPolygon<T>) -> bool
Source§impl<F: CoordFloat + FromPrimitive> Densifiable<F> for Triangle<F>
impl<F: CoordFloat + FromPrimitive> Densifiable<F> for Triangle<F>
Source§impl<T> DensifyHaversine<T> for Triangle<T>where
T: CoordFloat + FromPrimitive,
Line<T>: HaversineLength<T>,
LineString<T>: HaversineLength<T>,
impl<T> DensifyHaversine<T> for Triangle<T>where
T: CoordFloat + FromPrimitive,
Line<T>: HaversineLength<T>,
LineString<T>: HaversineLength<T>,
Source§impl<F> Distance<F, &Geometry<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Geometry<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &Geometry<F>, b: &Triangle<F>) -> F
fn distance(&self, a: &Geometry<F>, b: &Triangle<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &GeometryCollection<F>, &Triangle<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &GeometryCollection<F>, &Triangle<F>> for Euclidean
Source§fn distance(
&self,
iter_geometry: &GeometryCollection<F>,
to_geometry: &Triangle<F>,
) -> F
fn distance( &self, iter_geometry: &GeometryCollection<F>, to_geometry: &Triangle<F>, ) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F> Distance<F, &Line<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Line<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &Line<F>, b: &Triangle<F>) -> F
fn distance(&self, a: &Line<F>, b: &Triangle<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F> Distance<F, &LineString<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &LineString<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &LineString<F>, b: &Triangle<F>) -> F
fn distance(&self, a: &LineString<F>, b: &Triangle<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &MultiLineString<F>, &Triangle<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiLineString<F>, &Triangle<F>> for Euclidean
Source§fn distance(
&self,
iter_geometry: &MultiLineString<F>,
to_geometry: &Triangle<F>,
) -> F
fn distance( &self, iter_geometry: &MultiLineString<F>, to_geometry: &Triangle<F>, ) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPoint<F>, &Triangle<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPoint<F>, &Triangle<F>> for Euclidean
Source§fn distance(
&self,
iter_geometry: &MultiPoint<F>,
to_geometry: &Triangle<F>,
) -> F
fn distance( &self, iter_geometry: &MultiPoint<F>, to_geometry: &Triangle<F>, ) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Triangle<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Triangle<F>> for Euclidean
Source§fn distance(
&self,
iter_geometry: &MultiPolygon<F>,
to_geometry: &Triangle<F>,
) -> F
fn distance( &self, iter_geometry: &MultiPolygon<F>, to_geometry: &Triangle<F>, ) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F> Distance<F, &Point<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Point<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &Point<F>, b: &Triangle<F>) -> F
fn distance(&self, a: &Point<F>, b: &Triangle<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F> Distance<F, &Polygon<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Polygon<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &Polygon<F>, b: &Triangle<F>) -> F
fn distance(&self, a: &Polygon<F>, b: &Triangle<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F> Distance<F, &Rect<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Rect<F>, &Triangle<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &Rect<F>, b: &Triangle<F>) -> F
fn distance(&self, a: &Rect<F>, b: &Triangle<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &Triangle<F>, &Geometry<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &Triangle<F>, &Geometry<F>> for Euclidean
Source§fn distance(&self, origin: &Triangle<F>, destination: &Geometry<F>) -> F
fn distance(&self, origin: &Triangle<F>, destination: &Geometry<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F> Distance<F, &Triangle<F>, &GeometryCollection<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Triangle<F>, &GeometryCollection<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &Triangle<F>, b: &GeometryCollection<F>) -> F
fn distance(&self, a: &Triangle<F>, b: &GeometryCollection<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &Triangle<F>, &Line<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &Triangle<F>, &Line<F>> for Euclidean
Source§fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &Line<F>) -> F
fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &Line<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &Triangle<F>, &LineString<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &Triangle<F>, &LineString<F>> for Euclidean
Source§fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &LineString<F>) -> F
fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &LineString<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F> Distance<F, &Triangle<F>, &MultiLineString<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Triangle<F>, &MultiLineString<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &Triangle<F>, b: &MultiLineString<F>) -> F
fn distance(&self, a: &Triangle<F>, b: &MultiLineString<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F> Distance<F, &Triangle<F>, &MultiPoint<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Triangle<F>, &MultiPoint<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &Triangle<F>, b: &MultiPoint<F>) -> F
fn distance(&self, a: &Triangle<F>, b: &MultiPoint<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F> Distance<F, &Triangle<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
impl<F> Distance<F, &Triangle<F>, &MultiPolygon<F>> for Euclideanwhere
F: GeoFloat,
Source§fn distance(&self, a: &Triangle<F>, b: &MultiPolygon<F>) -> F
fn distance(&self, a: &Triangle<F>, b: &MultiPolygon<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &Triangle<F>, &Point<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &Triangle<F>, &Point<F>> for Euclidean
Source§fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &Point<F>) -> F
fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &Point<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &Triangle<F>, &Polygon<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &Triangle<F>, &Polygon<F>> for Euclidean
Source§fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &Polygon<F>) -> F
fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &Polygon<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &Triangle<F>, &Rect<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &Triangle<F>, &Rect<F>> for Euclidean
Source§fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &Rect<F>) -> F
fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &Rect<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<F: GeoFloat> Distance<F, &Triangle<F>, &Triangle<F>> for Euclidean
impl<F: GeoFloat> Distance<F, &Triangle<F>, &Triangle<F>> for Euclidean
Source§fn distance(&self, origin: &Triangle<F>, destination: &Triangle<F>) -> F
fn distance(&self, origin: &Triangle<F>, destination: &Triangle<F>) -> F
Note that not all implementations support all geometry combinations, but at least
Point to Point
is supported.
See specific implementations for details. Read moreSource§fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
fn distance_within(
&self,
origin: Origin,
destination: Destination,
distance: F,
) -> boolwhere
F: PartialOrd,
Returns
true if the minimum distance between origin and destination is less than
or equal to distance Read moreSource§impl<T> EuclideanDistance<T> for Triangle<T>
impl<T> EuclideanDistance<T> for Triangle<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Geometry<T>> for Triangle<T>
impl<T> EuclideanDistance<T, Geometry<T>> for Triangle<T>
Source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, GeometryCollection<T>> for Triangle<T>
impl<T> EuclideanDistance<T, GeometryCollection<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &GeometryCollection<T>) -> T
fn euclidean_distance(&self, other: &GeometryCollection<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Line<T>> for Triangle<T>
impl<T> EuclideanDistance<T, Line<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &Line<T>) -> T
fn euclidean_distance(&self, other: &Line<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, LineString<T>> for Triangle<T>
impl<T> EuclideanDistance<T, LineString<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &LineString<T>) -> T
fn euclidean_distance(&self, other: &LineString<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, MultiLineString<T>> for Triangle<T>
impl<T> EuclideanDistance<T, MultiLineString<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &MultiLineString<T>) -> T
fn euclidean_distance(&self, other: &MultiLineString<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, MultiPoint<T>> for Triangle<T>
impl<T> EuclideanDistance<T, MultiPoint<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &MultiPoint<T>) -> T
fn euclidean_distance(&self, other: &MultiPoint<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, MultiPolygon<T>> for Triangle<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Point<T>> for Triangle<T>
impl<T> EuclideanDistance<T, Point<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &Point<T>) -> T
fn euclidean_distance(&self, other: &Point<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Polygon<T>> for Triangle<T>
impl<T> EuclideanDistance<T, Polygon<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &Polygon<T>) -> T
fn euclidean_distance(&self, other: &Polygon<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Rect<T>> for Triangle<T>
impl<T> EuclideanDistance<T, Rect<T>> for Triangle<T>
Source§fn euclidean_distance(&self, other: &Rect<T>) -> T
fn euclidean_distance(&self, other: &Rect<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for Geometry<T>
impl<T> EuclideanDistance<T, Triangle<T>> for Geometry<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for GeometryCollection<T>
impl<T> EuclideanDistance<T, Triangle<T>> for GeometryCollection<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for Line<T>
impl<T> EuclideanDistance<T, Triangle<T>> for Line<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for LineString<T>
impl<T> EuclideanDistance<T, Triangle<T>> for LineString<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for MultiLineString<T>
impl<T> EuclideanDistance<T, Triangle<T>> for MultiLineString<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for MultiPoint<T>
impl<T> EuclideanDistance<T, Triangle<T>> for MultiPoint<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, Triangle<T>> for MultiPolygon<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for Point<T>
impl<T> EuclideanDistance<T, Triangle<T>> for Point<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for Polygon<T>
impl<T> EuclideanDistance<T, Triangle<T>> for Polygon<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl<T> EuclideanDistance<T, Triangle<T>> for Rect<T>
impl<T> EuclideanDistance<T, Triangle<T>> for Rect<T>
Source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
👎Deprecated since 0.29.0: Please use the
Euclidean.distance method from the Distance trait insteadReturns the distance between two geometries Read more
Source§impl GeodesicArea<f64> for Triangle
impl GeodesicArea<f64> for Triangle
Source§fn geodesic_perimeter(&self) -> f64
fn geodesic_perimeter(&self) -> f64
Determine the perimeter of a geometry on an ellipsoidal model of the earth. Read more
Source§fn geodesic_area_signed(&self) -> f64
fn geodesic_area_signed(&self) -> f64
Determine the area of a geometry on an ellipsoidal model of the earth. Read more
Source§fn geodesic_area_unsigned(&self) -> f64
fn geodesic_area_unsigned(&self) -> f64
Determine the area of a geometry on an ellipsoidal model of the earth. Supports very large geometries that cover a significant portion of the earth. Read more
Source§impl<C: GeoNum> HasDimensions for Triangle<C>
impl<C: GeoNum> HasDimensions for Triangle<C>
Source§fn dimensions(&self) -> Dimensions
fn dimensions(&self) -> Dimensions
The dimensions of some geometries are fixed, e.g. a Point always has 0 dimensions. However
for others, the dimensionality depends on the specific geometry instance - for example
typical
Rects are 2-dimensional, but it’s possible to create degenerate Rects which
have either 1 or 0 dimensions. Read moreSource§fn boundary_dimensions(&self) -> Dimensions
fn boundary_dimensions(&self) -> Dimensions
The dimensions of the
Geometry’s boundary, as used by OGC-SFA. Read moreSource§impl<T> HaversineClosestPoint<T> for Triangle<T>where
T: GeoFloat + FromPrimitive,
impl<T> HaversineClosestPoint<T> for Triangle<T>where
T: GeoFloat + FromPrimitive,
fn haversine_closest_point(&self, from: &Point<T>) -> Closest<T>
Source§impl<T> InteriorPoint for Triangle<T>where
T: GeoFloat,
impl<T> InteriorPoint for Triangle<T>where
T: GeoFloat,
Source§impl<T> Intersects<Coord<T>> for Triangle<T>where
T: GeoNum,
impl<T> Intersects<Coord<T>> for Triangle<T>where
T: GeoNum,
fn intersects(&self, rhs: &Coord<T>) -> bool
Source§impl<T> Intersects<Geometry<T>> for Triangle<T>
impl<T> Intersects<Geometry<T>> for Triangle<T>
fn intersects(&self, rhs: &Geometry<T>) -> bool
Source§impl<T> Intersects<GeometryCollection<T>> for Triangle<T>
impl<T> Intersects<GeometryCollection<T>> for Triangle<T>
fn intersects(&self, rhs: &GeometryCollection<T>) -> bool
Source§impl<T> Intersects<Line<T>> for Triangle<T>
impl<T> Intersects<Line<T>> for Triangle<T>
fn intersects(&self, rhs: &Line<T>) -> bool
Source§impl<T> Intersects<LineString<T>> for Triangle<T>
impl<T> Intersects<LineString<T>> for Triangle<T>
fn intersects(&self, rhs: &LineString<T>) -> bool
Source§impl<T> Intersects<MultiLineString<T>> for Triangle<T>
impl<T> Intersects<MultiLineString<T>> for Triangle<T>
fn intersects(&self, rhs: &MultiLineString<T>) -> bool
Source§impl<T> Intersects<MultiPoint<T>> for Triangle<T>
impl<T> Intersects<MultiPoint<T>> for Triangle<T>
fn intersects(&self, rhs: &MultiPoint<T>) -> bool
Source§impl<T> Intersects<MultiPolygon<T>> for Triangle<T>
impl<T> Intersects<MultiPolygon<T>> for Triangle<T>
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
Source§impl<T> Intersects<Point<T>> for Triangle<T>
impl<T> Intersects<Point<T>> for Triangle<T>
fn intersects(&self, rhs: &Point<T>) -> bool
Source§impl<T> Intersects<Polygon<T>> for Triangle<T>where
T: GeoNum,
impl<T> Intersects<Polygon<T>> for Triangle<T>where
T: GeoNum,
fn intersects(&self, rhs: &Polygon<T>) -> bool
Source§impl<T> Intersects<Rect<T>> for Triangle<T>
impl<T> Intersects<Rect<T>> for Triangle<T>
fn intersects(&self, rhs: &Rect<T>) -> bool
Source§impl<T> Intersects<Triangle<T>> for Coord<T>
impl<T> Intersects<Triangle<T>> for Coord<T>
fn intersects(&self, rhs: &Triangle<T>) -> bool
Source§impl<T> Intersects<Triangle<T>> for Line<T>where
T: GeoNum,
impl<T> Intersects<Triangle<T>> for Line<T>where
T: GeoNum,
fn intersects(&self, rhs: &Triangle<T>) -> bool
Source§impl<T> Intersects<Triangle<T>> for LineString<T>where
T: GeoNum,
impl<T> Intersects<Triangle<T>> for LineString<T>where
T: GeoNum,
fn intersects(&self, rhs: &Triangle<T>) -> bool
Source§impl<T> Intersects<Triangle<T>> for Polygon<T>
impl<T> Intersects<Triangle<T>> for Polygon<T>
fn intersects(&self, rhs: &Triangle<T>) -> bool
Source§impl<T> Intersects<Triangle<T>> for Rect<T>where
T: GeoNum,
impl<T> Intersects<Triangle<T>> for Rect<T>where
T: GeoNum,
fn intersects(&self, rhs: &Triangle<T>) -> bool
Source§impl<T> Intersects for Triangle<T>where
T: GeoNum,
impl<T> Intersects for Triangle<T>where
T: GeoNum,
fn intersects(&self, rhs: &Triangle<T>) -> bool
Source§impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for Triangle<T>
impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for Triangle<T>
Source§impl<T: CoordNum> MapCoordsInPlace<T> for Triangle<T>
impl<T: CoordNum> MapCoordsInPlace<T> for Triangle<T>
Source§impl<T> RTreeObject for Triangle<T>
impl<T> RTreeObject for Triangle<T>
Source§impl<F: GeoFloat> Relate<F> for Triangle<F>
impl<F: GeoFloat> Relate<F> for Triangle<F>
Source§fn geometry_graph(&self, arg_index: usize) -> GeometryGraph<'_, F>
fn geometry_graph(&self, arg_index: usize) -> GeometryGraph<'_, F>
Returns a noded topology graph for the geometry. Read more
fn relate(&self, other: &impl Relate<F>) -> IntersectionMatrixwhere
Self: Sized,
Source§impl<T> RelativeEq for Triangle<T>where
T: CoordNum + RelativeEq<Epsilon = T>,
impl<T> RelativeEq for Triangle<T>where
T: CoordNum + RelativeEq<Epsilon = T>,
Source§fn relative_eq(
&self,
other: &Triangle<T>,
epsilon: <Triangle<T> as AbsDiffEq>::Epsilon,
max_relative: <Triangle<T> as AbsDiffEq>::Epsilon,
) -> bool
fn relative_eq( &self, other: &Triangle<T>, epsilon: <Triangle<T> as AbsDiffEq>::Epsilon, max_relative: <Triangle<T> as AbsDiffEq>::Epsilon, ) -> bool
Equality assertion within a relative limit.
§Examples
use geo_types::{point, Triangle};
let a = Triangle::new((0.0, 0.0).into(), (10.0, 10.0).into(), (0.0, 5.0).into());
let b = Triangle::new((0.0, 0.0).into(), (10.01, 10.0).into(), (0.0, 5.0).into());
approx::assert_relative_eq!(a, b, max_relative=0.1);
approx::assert_relative_ne!(a, b, max_relative=0.0001);Source§fn default_max_relative() -> <Triangle<T> as AbsDiffEq>::Epsilon
fn default_max_relative() -> <Triangle<T> as AbsDiffEq>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
The inverse of
RelativeEq::relative_eq.Source§impl<T: CoordNum> RemoveRepeatedPoints<T> for Triangle<T>
impl<T: CoordNum> RemoveRepeatedPoints<T> for Triangle<T>
Source§fn remove_repeated_points(&self) -> Self
fn remove_repeated_points(&self) -> Self
Create a new geometry with (consecutive) repeated points removed.
Source§fn remove_repeated_points_mut(&mut self)
fn remove_repeated_points_mut(&mut self)
Remove (consecutive) repeated points inplace.
Source§impl<T> TryFrom<Geometry<T>> for Triangle<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
impl<T> TryFrom<Geometry<T>> for Triangle<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
Source§impl<T> UlpsEq for Triangle<T>
impl<T> UlpsEq for Triangle<T>
Source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
Source§impl<F: CoordFloat> Validation for Triangle<F>
impl<F: CoordFloat> Validation for Triangle<F>
type Error = InvalidTriangle
Source§fn visit_validation<T>(
&self,
handle_validation_error: Box<dyn FnMut(Self::Error) -> Result<(), T> + '_>,
) -> Result<(), T>
fn visit_validation<T>( &self, handle_validation_error: Box<dyn FnMut(Self::Error) -> Result<(), T> + '_>, ) -> Result<(), T>
Visit the validation of the geometry. Read more
impl<T> Copy for Triangle<T>
impl<T> Eq for Triangle<T>
impl<T> StructuralPartialEq for Triangle<T>where
T: CoordNum,
Auto Trait Implementations§
impl<T> Freeze for Triangle<T>where
T: Freeze,
impl<T> RefUnwindSafe for Triangle<T>where
T: RefUnwindSafe,
impl<T> Send for Triangle<T>where
T: Send,
impl<T> Sync for Triangle<T>where
T: Sync,
impl<T> Unpin for Triangle<T>where
T: Unpin,
impl<T> UnwindSafe for Triangle<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T, M> AffineOps<T> for M
impl<T, M> AffineOps<T> for M
Source§fn affine_transform(&self, transform: &AffineTransform<T>) -> M
fn affine_transform(&self, transform: &AffineTransform<T>) -> M
Apply
transform immutably, outputting a new geometry.Source§fn affine_transform_mut(&mut self, transform: &AffineTransform<T>)
fn affine_transform_mut(&mut self, transform: &AffineTransform<T>)
Apply
transform to mutate self.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<'a, T, G> ConvexHull<'a, T> for Gwhere
T: GeoNum,
G: CoordsIter<Scalar = T>,
impl<'a, T, G> ConvexHull<'a, T> for Gwhere
T: GeoNum,
G: CoordsIter<Scalar = T>,
Source§impl<'a, T, G> Extremes<'a, T> for Gwhere
G: CoordsIter<Scalar = T>,
T: CoordNum,
impl<'a, T, G> Extremes<'a, T> for Gwhere
G: CoordsIter<Scalar = T>,
T: CoordNum,
Source§impl<T, G> HausdorffDistance<T> for Gwhere
T: GeoFloat,
G: CoordsIter<Scalar = T>,
impl<T, G> HausdorffDistance<T> for Gwhere
T: GeoFloat,
G: CoordsIter<Scalar = T>,
fn hausdorff_distance<Rhs>(&self, rhs: &Rhs) -> Twhere
Rhs: CoordsIter<Scalar = T>,
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 moreSource§impl<T, G> MinimumRotatedRect<T> for G
impl<T, G> MinimumRotatedRect<T> for G
type Scalar = T
fn minimum_rotated_rect( &self, ) -> Option<Polygon<<G as MinimumRotatedRect<T>>::Scalar>>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<G, IP, IR, T> Rotate<T> for G
impl<G, IP, IR, T> Rotate<T> for G
Source§fn rotate_around_centroid(&self, degrees: T) -> G
fn rotate_around_centroid(&self, degrees: T) -> G
Source§fn rotate_around_centroid_mut(&mut self, degrees: T)
fn rotate_around_centroid_mut(&mut self, degrees: T)
Mutable version of
Self::rotate_around_centroidSource§fn rotate_around_center(&self, degrees: T) -> G
fn rotate_around_center(&self, degrees: T) -> G
Rotate a geometry around the center of its bounding box by an angle, in
degrees. Read more
Source§fn rotate_around_center_mut(&mut self, degrees: T)
fn rotate_around_center_mut(&mut self, degrees: T)
Mutable version of
Self::rotate_around_centerSource§fn rotate_around_point(&self, degrees: T, point: Point<T>) -> G
fn rotate_around_point(&self, degrees: T, point: Point<T>) -> G
Rotate a Geometry around an arbitrary point by an angle, given in degrees Read more
Source§fn rotate_around_point_mut(&mut self, degrees: T, point: Point<T>)
fn rotate_around_point_mut(&mut self, degrees: T, point: Point<T>)
Mutable version of
Self::rotate_around_pointSource§impl<T, IR, G> Scale<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
impl<T, IR, G> Scale<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
Source§fn scale(&self, scale_factor: T) -> G
fn scale(&self, scale_factor: T) -> G
Scale a geometry from it’s bounding box center. Read more
Source§fn scale_xy(&self, x_factor: T, y_factor: T) -> G
fn scale_xy(&self, x_factor: T, y_factor: T) -> G
Scale a geometry from it’s bounding box center, using different values for
x_factor and
y_factor to distort the geometry’s aspect ratio. Read moreSource§fn scale_xy_mut(&mut self, x_factor: T, y_factor: T)
fn scale_xy_mut(&mut self, x_factor: T, y_factor: T)
Mutable version of
scale_xy.Source§fn scale_around_point(
&self,
x_factor: T,
y_factor: T,
origin: impl Into<Coord<T>>,
) -> G
fn scale_around_point( &self, x_factor: T, y_factor: T, origin: impl Into<Coord<T>>, ) -> G
Scale a geometry around a point of
origin. Read moreSource§fn scale_around_point_mut(
&mut self,
x_factor: T,
y_factor: T,
origin: impl Into<Coord<T>>,
)
fn scale_around_point_mut( &mut self, x_factor: T, y_factor: T, origin: impl Into<Coord<T>>, )
Mutable version of
scale_around_point.Source§impl<T, IR, G> Skew<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
impl<T, IR, G> Skew<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
Source§fn skew(&self, degrees: T) -> G
fn skew(&self, degrees: T) -> G
An affine transformation which skews a geometry, sheared by a uniform angle along the x and
y dimensions. Read more
Source§fn skew_xy(&self, degrees_x: T, degrees_y: T) -> G
fn skew_xy(&self, degrees_x: T, degrees_y: T) -> G
An affine transformation which skews a geometry, sheared by an angle along the x and y dimensions. Read more
Source§fn skew_xy_mut(&mut self, degrees_x: T, degrees_y: T)
fn skew_xy_mut(&mut self, degrees_x: T, degrees_y: T)
Mutable version of
skew_xy.Source§fn skew_around_point(&self, xs: T, ys: T, origin: impl Into<Coord<T>>) -> G
fn skew_around_point(&self, xs: T, ys: T, origin: impl Into<Coord<T>>) -> G
An affine transformation which skews a geometry around a point of
origin, sheared by an
angle along the x and y dimensions. Read moreSource§fn skew_around_point_mut(&mut self, xs: T, ys: T, origin: impl Into<Coord<T>>)
fn skew_around_point_mut(&mut self, xs: T, ys: T, origin: impl Into<Coord<T>>)
Mutable version of
skew_around_point.Source§impl<T, G> ToDegrees<T> for G
impl<T, G> ToDegrees<T> for G
fn to_degrees(&self) -> Self
fn to_degrees_in_place(&mut self)
Source§impl<T, G> ToRadians<T> for G
impl<T, G> ToRadians<T> for G
fn to_radians(&self) -> Self
fn to_radians_in_place(&mut self)
Source§impl<'a, T, G> TriangulateDelaunay<'a, T> for Gwhere
T: SpadeTriangulationFloat,
G: TriangulationRequirementTrait<'a, T>,
impl<'a, T, G> TriangulateDelaunay<'a, T> for Gwhere
T: SpadeTriangulationFloat,
G: TriangulationRequirementTrait<'a, T>,
Source§fn unconstrained_triangulation(&'a self) -> TriangulationResult<Triangles<T>>
fn unconstrained_triangulation(&'a self) -> TriangulationResult<Triangles<T>>
returns a triangulation that’s solely based on the points of the geometric object Read more
Source§fn constrained_outer_triangulation(
&'a self,
config: DelaunayTriangulationConfig<T>,
) -> TriangulationResult<Triangles<T>>
fn constrained_outer_triangulation( &'a self, config: DelaunayTriangulationConfig<T>, ) -> TriangulationResult<Triangles<T>>
returns triangulation that’s based on the points of the geometric object and also
incorporates the lines of the input geometry Read more
Source§fn constrained_triangulation(
&'a self,
config: DelaunayTriangulationConfig<T>,
) -> TriangulationResult<Triangles<T>>
fn constrained_triangulation( &'a self, config: DelaunayTriangulationConfig<T>, ) -> TriangulationResult<Triangles<T>>
returns triangulation that’s based on the points of the geometric object and also
incorporates the lines of the input geometry Read more
Source§impl<'a, T, G> TriangulateSpade<'a, T> for Gwhere
T: SpadeTriangulationFloat,
G: TriangulationRequirementTrait<'a, T>,
impl<'a, T, G> TriangulateSpade<'a, T> for Gwhere
T: SpadeTriangulationFloat,
G: TriangulationRequirementTrait<'a, T>,
Source§fn unconstrained_triangulation(&'a self) -> TriangulationResult<Triangles<T>>
fn unconstrained_triangulation(&'a self) -> TriangulationResult<Triangles<T>>
👎Deprecated since 0.29.4: please use the
triangulate_delaunay module insteadreturns a triangulation that’s solely based on the points of the geometric object Read more
Source§fn constrained_outer_triangulation(
&'a self,
config: SpadeTriangulationConfig<T>,
) -> TriangulationResult<Triangles<T>>
fn constrained_outer_triangulation( &'a self, config: SpadeTriangulationConfig<T>, ) -> TriangulationResult<Triangles<T>>
👎Deprecated since 0.29.4: please use the
triangulate_delaunay module insteadreturns triangulation that’s based on the points of the geometric object and also
incorporates the lines of the input geometry Read more
Source§fn constrained_triangulation(
&'a self,
config: SpadeTriangulationConfig<T>,
) -> TriangulationResult<Triangles<T>>
fn constrained_triangulation( &'a self, config: SpadeTriangulationConfig<T>, ) -> TriangulationResult<Triangles<T>>
👎Deprecated since 0.29.4: please use the
triangulate_delaunay module insteadreturns triangulation that’s based on the points of the geometric object and also
incorporates the lines of the input geometry Read more