[−][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
Methods
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 Shape for Triangle
[src]
fn contains(&self, v: impl Into<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: impl Into<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: impl Into<Vector>) -> Self where
Self: Sized,
[src]
Self: Sized,
impl Drawable for Triangle
[src]
impl Clone for Triangle
[src]
impl Copy for Triangle
[src]
impl Default for Triangle
[src]
impl Eq for Triangle
[src]
impl PartialEq<Triangle> for Triangle
[src]
impl Debug for Triangle
[src]
impl Serialize for Triangle
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Triangle
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Triangle
impl Sync for Triangle
impl Unpin for Triangle
impl UnwindSafe for Triangle
impl RefUnwindSafe for Triangle
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Any + Debug,
[src]
T: Copy + PartialEq<T> + Any + Debug,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,