[−][src]Struct quicksilver::geom::Triangle
A triangle with three points
Fields
a: Vector
The first point
b: Vector
The second point
c: Vector
The third point
Implementations
impl Triangle
[src]
pub fn new(a: Vector, b: Vector, c: Vector) -> Triangle
[src]
👎 Deprecated since 0.4.0-alpha0.5:
Use another collision library like vek
instead; please comment on issue #552 for use-cases other libraries don't solve
Create a triangle from Vector
s of all three points
pub fn area(self) -> f32
[src]
Calculate the area of the triangle
Trait Implementations
impl Clone for Triangle
[src]
impl Copy for Triangle
[src]
impl Debug for Triangle
[src]
impl Default for Triangle
[src]
impl Eq for Triangle
[src]
impl PartialEq<Triangle> for Triangle
[src]
impl Shape for Triangle
[src]
fn contains(&self, v: Vector) -> bool
[src]
fn intersects(&self, line: &Line) -> bool
[src]
fn overlaps_circle(&self, circ: &Circle) -> bool
[src]
fn overlaps_rectangle(&self, rect: &Rectangle) -> bool
[src]
fn overlaps(&self, other: &impl Shape) -> bool
[src]
fn center(&self) -> Vector
[src]
fn bounding_box(&self) -> Rectangle
[src]
fn translate(&self, v: Vector) -> Self
[src]
#[must_use]fn transformed_bounding_box(&self, transform: Transform) -> Rectangle
[src]
#[must_use]fn constrain(&self, outer: &Rectangle) -> Self where
Self: Sized,
[src]
Self: Sized,
#[must_use]fn with_center(&self, center: Vector) -> Self where
Self: Sized,
[src]
Self: Sized,
Auto Trait Implementations
impl RefUnwindSafe for Triangle
impl Send for Triangle
impl Sync for Triangle
impl Unpin for Triangle
impl UnwindSafe for Triangle
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,