pub trait Geometry2DExt: Geometry {
// Required methods
fn aabb_2d(&self) -> AABB2D<Self::Scalar>;
fn outer_ring(&self) -> &[(Self::Scalar, Self::Scalar)];
fn holes(&self) -> &[Vec<(Self::Scalar, Self::Scalar)>];
fn is_convex(&self) -> bool;
fn convex_hull(&self) -> Vec<(Self::Scalar, Self::Scalar)>;
fn perimeter(&self) -> Self::Scalar;
// Provided method
fn has_holes(&self) -> bool { ... }
}Expand description
Extended trait for 2D geometries.
Required Methods§
Sourcefn outer_ring(&self) -> &[(Self::Scalar, Self::Scalar)]
fn outer_ring(&self) -> &[(Self::Scalar, Self::Scalar)]
Returns the outer boundary as a sequence of points (polygon vertices).
Sourcefn convex_hull(&self) -> Vec<(Self::Scalar, Self::Scalar)>
fn convex_hull(&self) -> Vec<(Self::Scalar, Self::Scalar)>
Returns the convex hull of this geometry.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.