pub struct ModelImporter3D;Expand description
Stateless 3D model importer supporting Wavefront .obj and glTF 2.0 .gltf JSON assets.
Implementations§
Source§impl ModelImporter3D
Native Wavefront .obj and glTF 2.0 .gltf JSON parsers for ModelImporter3D.
impl ModelImporter3D
Native Wavefront .obj and glTF 2.0 .gltf JSON parsers for ModelImporter3D.
Sourcepub fn import(
format: ModelFormat,
source: &str,
fallback_material: PbrMaterial,
) -> Result<ImportedModel3D, String>
pub fn import( format: ModelFormat, source: &str, fallback_material: PbrMaterial, ) -> Result<ImportedModel3D, String>
Imports a 3D model from text source in the specified ModelFormat and generates LOD chains.
§Arguments
ModelFormat- Interchange format (ObjorGltfJson).&str- Raw.objor.gltftext content.PbrMaterial- Fallback PBR material when source omits material definitions.
§Returns
Result<ImportedModel3D, String>- Imported model bundle or parse error diagnostic.
Sourcepub fn parse_obj(
source: &str,
material: PbrMaterial,
) -> Result<ImportedModel3D, String>
pub fn parse_obj( source: &str, material: PbrMaterial, ) -> Result<ImportedModel3D, String>
Sourcepub fn parse_gltf_json(
source: &str,
fallback_material: PbrMaterial,
) -> Result<ImportedModel3D, String>
pub fn parse_gltf_json( source: &str, fallback_material: PbrMaterial, ) -> Result<ImportedModel3D, String>
Trait Implementations§
Source§impl Clone for ModelImporter3D
impl Clone for ModelImporter3D
impl Copy for ModelImporter3D
Source§impl Debug for ModelImporter3D
impl Debug for ModelImporter3D
Auto Trait Implementations§
impl Forget for ModelImporter3D
impl Freeze for ModelImporter3D
impl Move for ModelImporter3D
impl RefUnwindSafe for ModelImporter3D
impl Send for ModelImporter3D
impl Sync for ModelImporter3D
impl Unpin for ModelImporter3D
impl UnsafeUnpin for ModelImporter3D
impl UnwindSafe for ModelImporter3D
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