Type Definition fenris_geometry::SimplePolygon2d

source ·
pub type SimplePolygon2d<T> = SimplePolygon<T, U2>;

Implementations§

source§

impl<T: Real> SimplePolygon2d<T>

source

pub fn apply_isometry(&self, similarity: &Isometry3<T>) -> SimplePolygon3d<T>

Apply a similarity transform in order to construct a 3D simple polygon.

Each 2D vertex is implicitly assumed to have z coordinate 0.

source§

impl<T> SimplePolygon2d<T>where
    T: Scalar,

source

pub fn edge_iter<'a>(&'a self) -> impl 'a + Iterator<Item = LineSegment2d<T>>

An iterator over edges as line segments

Trait Implementations§

source§

impl<T> Distance<T, OPoint<T, Const<2>>> for SimplePolygon2d<T>where
    T: Real,

source§

fn distance(&self, point: &Point2<T>) -> T

source§

fn distance_bound(&self, query_geometry: &QueryGeometry) -> [T; 2]

Returns an interval [l, u] for the distance d, such that d is contained in [l, u].
source§

impl<T> From<ConvexPolygon<T>> for SimplePolygon2d<T>where
    T: Scalar,

source§

fn from(poly: ConvexPolygon<T>) -> Self

Converts to this type from the input type.
source§

impl<T> Polygon2d<T> for SimplePolygon2d<T>where
    T: Real,

source§

fn vertices(&self) -> &[Point2<T>]

source§

fn num_edges(&self) -> usize

source§

fn get_edge(&self, index: usize) -> Option<LineSegment2d<T>>

source§

fn pseudonormal_on_edge(&self, edge_index: usize, t: T) -> Option<Vector2<T>>

Returns the given pseudonormal (angle-weighted normal) given an edge index and a parameter representing a point on edge. Read more
source§

fn num_vertices(&self) -> usize

source§

fn for_each_edge(&self, func: impl FnMut(usize, LineSegment2d<T>))

source§

fn closest_edge(&self, x: &Point2<T>) -> Option<ClosestEdge<T>>

source§

fn intersects_segment(&self, segment: &LineSegment2d<T>) -> bool

source§

fn signed_area(&self) -> T

Computes the signed area of the (simple) polygon. Read more
source§

fn area(&self) -> T

Computes the area of the (simple) polygon.
source§

fn orientation(&self) -> Orientation