Struct nannou::ui::prelude::widget::primitive::shape::triangles::Triangle [−][src]
A single triangle described by three vertices.
Methods
impl<V> Triangle<V> where
V: Vertex,
[src]
impl<V> Triangle<V> where
V: Vertex,
pub fn add(self, amount: [f64; 2]) -> Triangle<V>
[src]
pub fn add(self, amount: [f64; 2]) -> Triangle<V>
Shift the triangle by the given amount by adding it onto the position of each point.
pub fn points(self) -> [[f64; 2]; 3]
[src]
pub fn points(self) -> [[f64; 2]; 3]
The three points that make up the triangle.
impl Triangle<[f64; 2]>
[src]
impl Triangle<[f64; 2]>
pub fn color(self, a: Rgba, b: Rgba, c: Rgba) -> Triangle<([f64; 2], Rgba)>
[src]
pub fn color(self, a: Rgba, b: Rgba, c: Rgba) -> Triangle<([f64; 2], Rgba)>
Convert the Triangle<Point>
to a Triangle<ColoredPoint>
.
pub fn color_all(self, color: Rgba) -> Triangle<([f64; 2], Rgba)>
[src]
pub fn color_all(self, color: Rgba) -> Triangle<([f64; 2], Rgba)>
Convert the Triangle<Point>
to a Triangle<ColoredPoint>
using the given color.
Trait Implementations
impl<V> Clone for Triangle<V> where
V: Clone + Vertex,
[src]
impl<V> Clone for Triangle<V> where
V: Clone + Vertex,
fn clone(&self) -> Triangle<V>
[src]
fn clone(&self) -> Triangle<V>
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<V> Debug for Triangle<V> where
V: Debug + Vertex,
[src]
impl<V> Debug for Triangle<V> where
V: Debug + Vertex,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<V> AsRef<Triangle<V>> for Triangle<V> where
V: Vertex,
[src]
impl<V> AsRef<Triangle<V>> for Triangle<V> where
V: Vertex,
impl<V> From<[V; 3]> for Triangle<V> where
V: Vertex,
[src]
impl<V> From<[V; 3]> for Triangle<V> where
V: Vertex,
impl<V> From<(V, V, V)> for Triangle<V> where
V: Vertex,
[src]
impl<V> From<(V, V, V)> for Triangle<V> where
V: Vertex,
impl<V> Into<(V, V, V)> for Triangle<V> where
V: Vertex,
[src]
impl<V> Into<(V, V, V)> for Triangle<V> where
V: Vertex,
impl<V> Into<[V; 3]> for Triangle<V> where
V: Vertex,
[src]
impl<V> Into<[V; 3]> for Triangle<V> where
V: Vertex,
impl<V> Deref for Triangle<V> where
V: Vertex,
[src]
impl<V> Deref for Triangle<V> where
V: Vertex,
type Target = [V; 3]
The resulting type after dereferencing.
fn deref(&self) -> &<Triangle<V> as Deref>::Target
[src]
fn deref(&self) -> &<Triangle<V> as Deref>::Target
Dereferences the value.
impl<V> Copy for Triangle<V> where
V: Copy + Vertex,
[src]
impl<V> Copy for Triangle<V> where
V: Copy + Vertex,
impl<V> PartialEq<Triangle<V>> for Triangle<V> where
V: PartialEq<V> + Vertex,
[src]
impl<V> PartialEq<Triangle<V>> for Triangle<V> where
V: PartialEq<V> + Vertex,