pub struct QuantizedMeshDecoder<'a> { /* private fields */ }Expand description
Quantized mesh decoder.
Decodes terrain mesh data from the quantized-mesh-1.0 format.
Implementations§
Source§impl<'a> QuantizedMeshDecoder<'a>
impl<'a> QuantizedMeshDecoder<'a>
Sourcepub fn new(data: &'a [u8]) -> Self
pub fn new(data: &'a [u8]) -> Self
Create a new decoder from raw bytes.
Automatically detects and handles gzip compression.
Sourcepub fn decode(data: &[u8]) -> DecodeResult<DecodedMesh>
pub fn decode(data: &[u8]) -> DecodeResult<DecodedMesh>
Decode the quantized-mesh data from a byte slice.
If the data is gzip compressed, it will be decompressed first.
Sourcepub fn decode_from<R: Read>(reader: R) -> DecodeResult<DecodedMesh>
pub fn decode_from<R: Read>(reader: R) -> DecodeResult<DecodedMesh>
Decode the quantized-mesh data from a reader.
If the data is gzip compressed, it will be decompressed first. The reader will be read to the end.
Auto Trait Implementations§
impl<'a> Freeze for QuantizedMeshDecoder<'a>
impl<'a> RefUnwindSafe for QuantizedMeshDecoder<'a>
impl<'a> Send for QuantizedMeshDecoder<'a>
impl<'a> Sync for QuantizedMeshDecoder<'a>
impl<'a> Unpin for QuantizedMeshDecoder<'a>
impl<'a> UnsafeUnpin for QuantizedMeshDecoder<'a>
impl<'a> UnwindSafe for QuantizedMeshDecoder<'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