Struct lyon::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,
S: Scalar,
pub fn contains_point(&self, point: TypedPoint2D<S, UnknownUnit>) -> bool
pub fn bounding_rect(&self) -> TypedRect<S, UnknownUnit>
Return the minimum bounding rectangle.
pub fn ab(&self) -> LineSegment<S>
pub fn ba(&self) -> LineSegment<S>
pub fn bc(&self) -> LineSegment<S>
pub fn cb(&self) -> LineSegment<S>
pub fn ca(&self) -> LineSegment<S>
pub fn ac(&self) -> LineSegment<S>
pub fn transform(
&self,
transform: &TypedTransform2D<S, UnknownUnit, UnknownUnit>
) -> Triangle<S>
&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
Test for triangle-triangle intersection.
pub fn intersects_line_segment(&self, segment: &LineSegment<S>) -> bool
Test for triangle-segment intersection.
Trait Implementations
impl<S> Copy for Triangle<S> where
S: Copy,
S: Copy,
impl<S> PartialEq<Triangle<S>> for Triangle<S> where
S: PartialEq<S>,
S: PartialEq<S>,
fn eq(&self, __arg_0: &Triangle<S>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Triangle<S>) -> bool
This method tests for !=
.
impl<S> Clone for Triangle<S> where
S: Clone,
S: Clone,
fn clone(&self) -> Triangle<S>
Returns a copy of the value. Read more
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,
S: Debug,