Type Definition fenris_geometry::Triangle2d

source ·
pub type Triangle2d<T> = Triangle<T, U2>;
Expand description

A triangle in two dimensions, consisting of three vertices.

For most purposes, the triangle is assumed to be specified with a counter-clockwise winding order, but it also provides facilities for determining the winding order of an arbitrarily constructed triangle.

Implementations§

source§

impl<T> Triangle2d<T>where
    T: Real,

source

pub fn orientation(&self) -> Orientation

source

pub fn signed_area(&self) -> T

source

pub fn area(&self) -> T

Trait Implementations§

source§

impl<T> Distance<T, OPoint<T, Const<2>>> for Triangle2d<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> SignedDistance<T, Const<2>> for Triangle2d<T>where
    T: Real,

source§

fn query_signed_distance(
    &self,
    point: &Point2<T>
) -> Option<SignedDistanceResult<T, U2>>