[−][src]Struct paddle::GpuMesh
Buffer for GPU primitives ready to be drawn, after tesselation and all CPU-side transformations have finished
Fields
vertices: Vec<GpuVertex>
triangles: Vec<GpuTriangle>
Implementations
impl GpuMesh
[src]
pub fn new() -> GpuMesh
[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>,
z: f32,
trans: Transform,
tex_trans: Option<Transform>,
bkg: Background<'_>
) -> u32
[src]
&mut self,
vertices: impl Iterator<Item = Vector>,
z: f32,
trans: Transform,
tex_trans: Option<Transform>,
bkg: Background<'_>
) -> u32
Add vertices from an iterator, some transforms, and a background
pub fn set_z(&mut self, z: i16)
[src]
Sets the z value for all vertices in the Mesh
pub fn scale(&mut self, r: f32)
[src]
Scales all vertices in the mesh by the given factor, taking (0,0) as origin
Auto Trait Implementations
impl RefUnwindSafe for GpuMesh
[src]
impl !Send for GpuMesh
[src]
impl !Sync for GpuMesh
[src]
impl Unpin for GpuMesh
[src]
impl UnwindSafe for GpuMesh
[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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,