#[non_exhaustive]pub enum Filter {
None,
Octahedral,
Quaternion,
Exponential,
Color,
}Expand description
A meshopt filter: how decoded attribute data was transformed before it was encoded, undone
by apply_filter. Parses from, and displays as, its name in the glTF extensions
("OCTAHEDRAL").
Non-exhaustive: the meshopt extensions may add filters.
use polysmelt::meshopt::Filter;
let filter: Filter = "QUATERNION".parse()?;
assert_eq!(filter, Filter::Quaternion);
assert_eq!(Filter::Color.to_string(), "COLOR");
assert!("SPLINE".parse::<Filter>().is_err());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
NONE: the data as it is.
Octahedral
OCTAHEDRAL: unit vectors, two components each (4 or 8 byte elements).
Quaternion
QUATERNION: unit quaternions, three components and an index (8 byte elements).
Exponential
EXPONENTIAL: floats as an exponent and mantissa each (elements a multiple of 4 bytes).
Color
COLOR (KHR_meshopt_compression only): RGBA colors as YCoCg (4 or 8 byte elements).
Implementations§
Trait Implementations§
impl Copy for Filter
impl Eq for Filter
impl StructuralPartialEq for Filter
Auto Trait Implementations§
impl Forget for Filter
impl Freeze for Filter
impl Move for Filter
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnsafeUnpin for Filter
impl UnwindSafe for Filter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.