Struct lyon_algorithms::geom::Triangle [−]
pub struct Triangle<S> { pub a: TypedPoint2D<S, UnknownUnit>, pub b: TypedPoint2D<S, UnknownUnit>, pub c: TypedPoint2D<S, UnknownUnit>, }
A 2D triangle defined by three points a
, b
and c
.
Fields
a: TypedPoint2D<S, UnknownUnit>
b: TypedPoint2D<S, UnknownUnit>
c: TypedPoint2D<S, UnknownUnit>
Methods
impl<S> Triangle<S> where
S: Scalar,
impl<S> Triangle<S> where
S: Scalar,
pub fn contains_point(&self, point: TypedPoint2D<S, UnknownUnit>) -> bool
pub fn contains_point(&self, point: TypedPoint2D<S, UnknownUnit>) -> bool
pub fn bounding_rect(&self) -> TypedRect<S, UnknownUnit>
pub fn bounding_rect(&self) -> TypedRect<S, UnknownUnit>
Return the minimum bounding rectangle.
pub fn ab(&self) -> LineSegment<S>
pub fn ab(&self) -> LineSegment<S>
pub fn ba(&self) -> LineSegment<S>
pub fn ba(&self) -> LineSegment<S>
pub fn bc(&self) -> LineSegment<S>
pub fn bc(&self) -> LineSegment<S>
pub fn cb(&self) -> LineSegment<S>
pub fn cb(&self) -> LineSegment<S>
pub fn ca(&self) -> LineSegment<S>
pub fn ca(&self) -> LineSegment<S>
pub fn ac(&self) -> LineSegment<S>
pub fn ac(&self) -> LineSegment<S>
pub fn transform(
&self,
transform: &TypedTransform2D<S, UnknownUnit, UnknownUnit>
) -> Triangle<S>
pub fn transform(
&self,
transform: &TypedTransform2D<S, UnknownUnit, UnknownUnit>
) -> Triangle<S>
[Not implemented] Applies the transform to this triangle and returns the results.
pub fn intersects(&self, other: &Triangle<S>) -> bool
pub fn intersects(&self, other: &Triangle<S>) -> bool
Test for triangle-triangle intersection.
pub fn intersects_line_segment(&self, segment: &LineSegment<S>) -> bool
pub fn intersects_line_segment(&self, segment: &LineSegment<S>) -> bool
Test for triangle-segment intersection.
Trait Implementations
impl<S> Clone for Triangle<S> where
S: Clone,
impl<S> Clone for Triangle<S> where
S: Clone,
fn clone(&self) -> Triangle<S>
fn clone(&self) -> Triangle<S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<S> Debug for Triangle<S> where
S: Debug,
impl<S> Debug for Triangle<S> where
S: Debug,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<S> Copy for Triangle<S> where
S: Copy,
impl<S> Copy for Triangle<S> where
S: Copy,
impl<S> PartialEq<Triangle<S>> for Triangle<S> where
S: PartialEq<S>,
impl<S> PartialEq<Triangle<S>> for Triangle<S> where
S: PartialEq<S>,