[−][src]Struct paddle::quicksilver_compat::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: impl Into<Vector>,
b: impl Into<Vector>,
c: impl Into<Vector>
) -> Triangle
[src]
a: impl Into<Vector>,
b: impl Into<Vector>,
c: impl Into<Vector>
) -> Triangle
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<'de> Deserialize<'de> for Triangle
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Triangle
[src]
impl PartialEq<Triangle> for Triangle
[src]
pub fn eq(&self, other: &Triangle) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for Triangle
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl Shape for Triangle
[src]
pub fn contains(&self, v: impl Into<Vector>) -> bool
[src]
pub fn intersects(&self, line: &Line) -> bool
[src]
pub fn overlaps_circle(&self, circ: &Circle) -> bool
[src]
pub fn overlaps_rectangle(&self, rect: &Rectangle) -> bool
[src]
pub fn overlaps(&self, other: &impl Shape) -> bool
[src]
pub fn center(&self) -> Vector
[src]
pub fn bounding_box(&self) -> Rectangle
[src]
pub fn translate(&self, v: impl Into<Vector>) -> Self
[src]
#[must_use]pub fn transformed_bounding_box(&self, transform: Transform) -> Rectangle
[src]
#[must_use]pub fn constrain(&self, outer: &Rectangle) -> Self where
Self: Sized,
[src]
Self: Sized,
#[must_use]pub fn with_center(&self, center: impl Into<Vector>) -> Self where
Self: Sized,
[src]
Self: Sized,
impl Tessellate for Triangle
[src]
pub fn tessellate<'a>(&self, mesh: &mut AbstractMesh, bkg: Background<'a>)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Triangle
[src]
impl Send for Triangle
[src]
impl Sync for Triangle
[src]
impl Unpin for Triangle
[src]
impl UnwindSafe for Triangle
[src]
Blanket Implementations
impl<T> Activity for T where
T: Any,
[src]
T: Any,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,