pub struct RteMeshBuilder { /* private fields */ }Expand description
Builder for GPU Relative-To-Eye (RTE) mesh buffers storing interleaved
[pos_high: 3, pos_low: 3, norm: 3, uv: 2] = 11 floats per vertex.
Implementations§
Source§impl RteMeshBuilder
impl RteMeshBuilder
pub const STRIDE: usize = 11
pub fn new() -> Self
pub fn with_capacity(vertex_count: usize, triangle_count: usize) -> Self
pub fn clear(&mut self)
pub fn vertex_count(&self) -> usize
pub fn triangle_count(&self) -> usize
pub fn push_vertex( &mut self, position: DVec3, normal: [f32; 3], uv: (f32, f32), ) -> u32
pub fn push_triangle(&mut self, a: u32, b: u32, c: u32)
pub fn push_quad(&mut self, a: u32, b: u32, c: u32, d: u32)
pub fn vertices(&self) -> &[f32]
pub fn indices(&self) -> &[u32]
Trait Implementations§
Source§impl Clone for RteMeshBuilder
impl Clone for RteMeshBuilder
Source§impl Debug for RteMeshBuilder
impl Debug for RteMeshBuilder
Auto Trait Implementations§
impl Forget for RteMeshBuilder
impl Freeze for RteMeshBuilder
impl Move for RteMeshBuilder
impl RefUnwindSafe for RteMeshBuilder
impl Send for RteMeshBuilder
impl Sync for RteMeshBuilder
impl Unpin for RteMeshBuilder
impl UnsafeUnpin for RteMeshBuilder
impl UnwindSafe for RteMeshBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more