pub enum IndicesView<'a> {
U16(&'a [u8]),
U32(&'a [u8]),
}Expand description
Triangle / edge indices viewed as borrowed bytes.
The original quantized-mesh stream stores indices as either u16 or u32
depending on whether vertex_count > 65535. The view keeps the raw
little-endian bytes and decodes lazily via Self::iter.
Variants§
U16(&'a [u8])
16-bit indices (used when vertex_count <= 65535). 2 bytes per index.
U32(&'a [u8])
32-bit indices. 4 bytes per index.
Implementations§
Source§impl<'a> IndicesView<'a>
impl<'a> IndicesView<'a>
Sourcepub fn iter_raw(&self) -> RawIndexIter<'a> ⓘ
pub fn iter_raw(&self) -> RawIndexIter<'a> ⓘ
Iterate the raw (still high-water-mark encoded) indices.
Sourcepub fn iter(&self) -> HighWaterMarkIter<RawIndexIter<'a>> ⓘ
pub fn iter(&self) -> HighWaterMarkIter<RawIndexIter<'a>> ⓘ
Iterate the fully decoded triangle indices.
Trait Implementations§
Source§impl<'a> Clone for IndicesView<'a>
impl<'a> Clone for IndicesView<'a>
Source§fn clone(&self) -> IndicesView<'a>
fn clone(&self) -> IndicesView<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for IndicesView<'a>
impl<'a> Debug for IndicesView<'a>
impl<'a> Copy for IndicesView<'a>
Auto Trait Implementations§
impl<'a> Freeze for IndicesView<'a>
impl<'a> RefUnwindSafe for IndicesView<'a>
impl<'a> Send for IndicesView<'a>
impl<'a> Sync for IndicesView<'a>
impl<'a> Unpin for IndicesView<'a>
impl<'a> UnsafeUnpin for IndicesView<'a>
impl<'a> UnwindSafe for IndicesView<'a>
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