pub struct MeshDivision { /* private fields */ }Expand description
DIV_ — Mesh division (v0–v2, 52 bytes)
Top-level mesh container grouping face indices, regions, batches, and mesh sections. Most models have a single division.
Implementations§
Source§impl MeshDivision
impl MeshDivision
Sourcepub fn faces(&self) -> &[u16]
pub fn faces(&self) -> &[u16]
Triangle indices (U16_)
Zero-copy view of the underlying std::vector.
Sourcepub fn faces_mut(&mut self) -> &mut [u16]
pub fn faces_mut(&mut self) -> &mut [u16]
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_faces(&mut self, values: &[u16])
pub fn resize_faces(&mut self, count: usize)
Sourcepub fn regions_len(&self) -> usize
pub fn regions_len(&self) -> usize
Regions / submeshes (REGN)
Sourcepub fn regions(&self, index: usize) -> Option<Ref<'_, Region>>
pub fn regions(&self, index: usize) -> Option<Ref<'_, Region>>
Borrows element index in place. None when out of range.
pub fn regions_mut(&mut self, index: usize) -> Option<RefMut<'_, Region>>
Sourcepub fn regions_iter(&self) -> impl ExactSizeIterator<Item = Ref<'_, Region>>
pub fn regions_iter(&self) -> impl ExactSizeIterator<Item = Ref<'_, Region>>
Iterate the elements, borrowing each in turn.
pub fn resize_regions(&mut self, count: usize)
Sourcepub fn batches_len(&self) -> usize
pub fn batches_len(&self) -> usize
Draw call batches (BAT_)
Sourcepub fn batches(&self, index: usize) -> Option<Ref<'_, Batch>>
pub fn batches(&self, index: usize) -> Option<Ref<'_, Batch>>
Borrows element index in place. None when out of range.
pub fn batches_mut(&mut self, index: usize) -> Option<RefMut<'_, Batch>>
Sourcepub fn batches_iter(&self) -> impl ExactSizeIterator<Item = Ref<'_, Batch>>
pub fn batches_iter(&self) -> impl ExactSizeIterator<Item = Ref<'_, Batch>>
Iterate the elements, borrowing each in turn.
pub fn resize_batches(&mut self, count: usize)
Sourcepub fn msec(&self, index: usize) -> Option<Ref<'_, MeshSection>>
pub fn msec(&self, index: usize) -> Option<Ref<'_, MeshSection>>
Borrows element index in place. None when out of range.
pub fn msec_mut(&mut self, index: usize) -> Option<RefMut<'_, MeshSection>>
Sourcepub fn msec_iter(&self) -> impl ExactSizeIterator<Item = Ref<'_, MeshSection>>
pub fn msec_iter(&self) -> impl ExactSizeIterator<Item = Ref<'_, MeshSection>>
Iterate the elements, borrowing each in turn.
pub fn resize_msec(&mut self, count: usize)
pub fn set_instances(&mut self, value: u32)
Trait Implementations§
Source§impl Debug for MeshDivision
impl Debug for MeshDivision
Source§impl Default for MeshDivision
impl Default for MeshDivision
Source§impl Drop for MeshDivision
impl Drop for MeshDivision
impl Send for MeshDivision
Auto Trait Implementations§
impl !Sync for MeshDivision
impl Freeze for MeshDivision
impl RefUnwindSafe for MeshDivision
impl Unpin for MeshDivision
impl UnsafeUnpin for MeshDivision
impl UnwindSafe for MeshDivision
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