pub struct Buffers { /* private fields */ }
Expand description
A struct of buffers that may be indexed by Obj
vertices.
Implementations
sourceimpl Buffers
impl Buffers
sourcepub fn positions(&self) -> &[[f32; 3]]
pub fn positions(&self) -> &[[f32; 3]]
Returns a reference to the position attributes contained within this Obj
.
sourcepub fn uvs(&self) -> &[[f32; 3]]
pub fn uvs(&self) -> &[[f32; 3]]
Returns a reference to the texture coordinate attributes contained within this Obj
.
sourcepub fn normals(&self) -> &[[f32; 3]]
pub fn normals(&self) -> &[[f32; 3]]
Returns a reference to the normal attributes contained within this Obj
.
sourcepub fn add_position(&mut self, position: [f32; 3]) -> usize
pub fn add_position(&mut self, position: [f32; 3]) -> usize
Add a new position attribute to this Obj
, returning its index.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Buffers
impl Send for Buffers
impl Sync for Buffers
impl Unpin for Buffers
impl UnwindSafe for Buffers
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more