Skip to main content

QuantizedMeshEncoder

Struct QuantizedMeshEncoder 

Source
pub struct QuantizedMeshEncoder { /* private fields */ }
Expand description

Quantized mesh encoder.

Encodes terrain mesh data into the quantized-mesh-1.0 format.

Implementations§

Source§

impl QuantizedMeshEncoder

Source

pub fn new( header: QuantizedMeshHeader, vertices: QuantizedVertices, indices: Vec<u32>, edge_indices: EdgeIndices, ) -> Self

Create a new encoder with mesh data.

Source

pub fn encode(&self) -> Vec<u8>

Encode to quantized-mesh format without compression.

Source

pub fn encode_with_options(&self, options: &EncodeOptions) -> Vec<u8>

Encode with options (extensions, compression).

Source

pub fn encode_to<W: Write>(&self, writer: W) -> Result<()>

Encode to a writer without compression.

Source

pub fn encode_to_with_options<W: Write>( &self, writer: W, options: &EncodeOptions, ) -> Result<()>

Encode to a writer with options (extensions, compression).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.