Struct gltf::Gltf

source · []
pub struct Gltf {
    pub document: Document,
    pub blob: Option<Vec<u8>>,
}
Expand description

glTF JSON wrapper plus binary payload.

Fields

document: Document

The glTF JSON wrapper.

blob: Option<Vec<u8>>

The glTF binary payload in the case of binary glTF.

Implementations

Convenience function that loads glTF from the file system.

Loads glTF from a reader without performing validation checks.

Loads glTF from a reader.

Loads glTF from a slice of bytes without performing validation checks.

Loads glTF from a slice of bytes.

Methods from Deref<Target = Document>

Returns an Iterator that visits the accessors of the glTF asset.

Returns an Iterator that visits the animations of the glTF asset.

Returns an Iterator that visits the pre-loaded buffers of the glTF asset.

Returns an Iterator that visits the cameras of the glTF asset.

Returns the default scene, if provided.

Returns the extensions referenced in this .document file.

Returns the extensions required to load and render this asset.

Returns an Iterator that visits the pre-loaded images of the glTF asset.

This is supported on crate feature KHR_lights_punctual only.

Returns an Iterator that visits the lights of the glTF asset as defined by the KHR_lights_punctual extension.

This is supported on crate feature KHR_materials_variants only.

Returns an Iterator that visits the variants of the glTF asset as defined by the KHR_materials_variants extension.

Returns an Iterator that visits the materials of the glTF asset.

Returns an Iterator that visits the meshes of the glTF asset.

Returns an Iterator that visits the nodes of the glTF asset.

Returns an Iterator that visits the samplers of the glTF asset.

Returns an Iterator that visits the scenes of the glTF asset.

Returns an Iterator that visits the skins of the glTF asset.

Returns an Iterator that visits the textures of the glTF asset.

Returns an Iterator that visits the pre-loaded buffer views of the glTF asset.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.