pub struct QuantizedMeshView<'a> {Show 13 fields
pub header: QuantizedMeshHeader,
pub vertex_count: u32,
pub use_32bit_indices: bool,
pub triangle_count: u32,
pub encoded_u_bytes: &'a [u8],
pub encoded_v_bytes: &'a [u8],
pub encoded_height_bytes: &'a [u8],
pub indices: IndicesView<'a>,
pub edge_west: IndicesView<'a>,
pub edge_south: IndicesView<'a>,
pub edge_east: IndicesView<'a>,
pub edge_north: IndicesView<'a>,
pub extensions: ExtensionsView<'a>,
}Expand description
Zero-copy view over a parsed quantized-mesh stream.
Every byte section (vertex / index / edge / extension data) is a slice
borrowed from the input. Use the iter_* helpers to decode on the fly,
or Self::into_owned to materialise everything into a DecodedMesh.
Fields§
§header: QuantizedMeshHeaderParsed 88-byte header (copied — it’s small and not aligned in the source).
vertex_count: u32Number of vertices.
use_32bit_indices: boolWhether the index stream uses 32-bit indices (vertex_count > 65535).
triangle_count: u32Number of triangles.
encoded_u_bytes: &'a [u8]Zigzag-delta encoded u coordinate bytes (2 bytes per vertex).
encoded_v_bytes: &'a [u8]Zigzag-delta encoded v coordinate bytes.
encoded_height_bytes: &'a [u8]Zigzag-delta encoded height bytes.
indices: IndicesView<'a>High-water-mark encoded triangle indices.
edge_west: IndicesView<'a>West-edge indices (raw little-endian).
edge_south: IndicesView<'a>South-edge indices.
edge_east: IndicesView<'a>East-edge indices.
edge_north: IndicesView<'a>North-edge indices.
extensions: ExtensionsView<'a>Parsed extension views.
Implementations§
Source§impl<'a> QuantizedMeshView<'a>
impl<'a> QuantizedMeshView<'a>
Sourcepub fn parse(data: &'a [u8]) -> DecodeResult<Self>
pub fn parse(data: &'a [u8]) -> DecodeResult<Self>
Parse a raw (already gzip-decompressed) quantized-mesh byte stream.
Sourcepub fn iter_u(&self) -> ZigzagDeltaIter<'a> ⓘ
pub fn iter_u(&self) -> ZigzagDeltaIter<'a> ⓘ
Lazily decoded u coordinates.
Sourcepub fn iter_v(&self) -> ZigzagDeltaIter<'a> ⓘ
pub fn iter_v(&self) -> ZigzagDeltaIter<'a> ⓘ
Lazily decoded v coordinates.
Sourcepub fn iter_height(&self) -> ZigzagDeltaIter<'a> ⓘ
pub fn iter_height(&self) -> ZigzagDeltaIter<'a> ⓘ
Lazily decoded height values.
Sourcepub fn into_owned(self) -> DecodeResult<DecodedMesh>
pub fn into_owned(self) -> DecodeResult<DecodedMesh>
Materialise into a fully owned DecodedMesh.
Trait Implementations§
Source§impl<'a> Clone for QuantizedMeshView<'a>
impl<'a> Clone for QuantizedMeshView<'a>
Source§fn clone(&self) -> QuantizedMeshView<'a>
fn clone(&self) -> QuantizedMeshView<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more