Struct genmesh::Quad
[−]
[src]
pub struct Quad<T> { pub x: T, pub y: T, pub z: T, pub w: T, }
A polygon with 4 points. Maps to GL_QUADS
Fields
x: T
the first point of a quad
y: T
the second point of a quad
z: T
the third point of a quad
w: T
the fourth point of a quad
Methods
impl<T> Quad<T>
[src]
fn new(v0: T, v1: T, v2: T, v3: T) -> Self
create a new Quad
with supplied vertices
Trait Implementations
impl<T: Clone> EmitTriangles for Quad<T>
[src]
type Vertex = T
The content of each point in the face
fn emit_triangles<F>(&self, emit: F) where
F: FnMut(Triangle<T>),
F: FnMut(Triangle<T>),
convert a polygon to one or more triangles, each triangle is returned by calling emit
Read more
impl<T: Clone> Clone for Quad<T>
[src]
fn clone(&self) -> Quad<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Quad<T>
[src]
impl<T: PartialEq> PartialEq for Quad<T>
[src]
fn eq(&self, __arg_0: &Quad<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Quad<T>) -> bool
This method tests for !=
.
impl<T: Eq> Eq for Quad<T>
[src]
impl<T: Copy> Copy for Quad<T>
[src]
impl<T: Clone, U> MapVertex<T, U> for Quad<T>
[src]
type Output = Quad<U>
Output
should be a a container of the same shape of the type It's internal values should reflect any transformation the map did. Read more
fn map_vertex<F>(self, map: F) -> Quad<U> where
F: FnMut(T) -> U,
F: FnMut(T) -> U,
map a function to each vertex in polygon creating a new polygon
impl<T: Clone> EmitLines for Quad<T>
[src]
type Vertex = T
The Vertex defines the corners of a Polygon
fn emit_lines<E>(self, emit: E) where
E: FnMut(Line<T>),
E: FnMut(Line<T>),
convert a polygon into lines, each line is emitted via calling of the callback of emit
This allow for a variable amount of lines to be returned Read more