pub struct MeshDispatcher { /* private fields */ }Expand description
Default mesh dispatcher: delegates to gltf or obj based on byte sniffing.
Intentionally not registered via inventory::submit! — this slot has
multiple competing implementations (gltf vs obj vs eventual FBX) and the
choice should be visible at the consumer’s call site:
ⓘ
svc.register_decoder::<Mesh>("mesh", MeshDispatcher::default());Implementations§
Source§impl MeshDispatcher
impl MeshDispatcher
Sourcepub fn new(resolver: Arc<dyn GltfResourceResolver>) -> Self
pub fn new(resolver: Arc<dyn GltfResourceResolver>) -> Self
Creates a dispatcher with the given gltf resource resolver.
Trait Implementations§
Source§impl AssetDecoder<Mesh> for MeshDispatcher
impl AssetDecoder<Mesh> for MeshDispatcher
Source§impl Clone for MeshDispatcher
impl Clone for MeshDispatcher
Source§fn clone(&self) -> MeshDispatcher
fn clone(&self) -> MeshDispatcher
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 Default for MeshDispatcher
impl Default for MeshDispatcher
Source§fn default() -> Self
fn default() -> Self
Default dispatcher uses NoOpResourceResolver for gltf. Suitable
for self-contained .glb files (the binary chunk is embedded) and
.obj files (no external resources at all). For .gltf files that
reference external .bin / texture buffers, supply a project-aware
resolver via MeshDispatcher::new — ProjectVfs::open does this
automatically with a FileSystemResolver rooted at the project’s
assets/ directory.
Auto Trait Implementations§
impl Freeze for MeshDispatcher
impl !RefUnwindSafe for MeshDispatcher
impl Send for MeshDispatcher
impl Sync for MeshDispatcher
impl Unpin for MeshDispatcher
impl UnsafeUnpin for MeshDispatcher
impl !UnwindSafe for MeshDispatcher
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().