[][src]Struct paddle::graphics::AbstractMesh

pub struct AbstractMesh {
    pub vertices: Vec<AbstractVertex>,
    pub triangles: Vec<AbstractTriangle>,
}

A way to store rendered objects without having to re-process them

Fields

vertices: Vec<AbstractVertex>triangles: Vec<AbstractTriangle>

Implementations

impl AbstractMesh[src]

pub fn new() -> AbstractMesh[src]

Create a new, empty mesh

This allocates, so hold on to meshes rather than creating and destroying them

pub fn clear(&mut self)[src]

Clear the mesh, removing anything that has been drawn to it

pub fn add_positioned_vertices(
    &mut self,
    vertices: impl Iterator<Item = Vector>,
    trans: Transform,
    tex_trans: Option<Transform>,
    bkg: Background<'_>
) -> u32
[src]

Add vertices from an iterator, some transforms, and a background

pub fn scale(&mut self, r: f32)[src]

Scales all vertices in the mesh by the given factor, taking (0,0) as origin

Trait Implementations

impl Render for AbstractMesh[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Activity for T where
    T: Any
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,