Struct gltf::Gltf [] [src]

pub struct Gltf {
    pub accessors: Map<Id, Accessor>,
    pub asset: Asset,
    pub buffers: Map<Id, Buffer>,
    pub buffer_views: Map<Id, BufferView>,
    pub materials: Map<Id, Material>,
    pub meshes: Map<Id, Mesh>,
    pub programs: Map<Id, Program>,
    pub shaders: Map<Id, Shader>,
    pub techniques: Map<Id, Technique>,
}

Fields

Methods

impl Gltf
[src]

Loads a glTF asset

Examples

Basic usage:

let gltf = gltf::Gltf::new("./examples/box/Box.gltf")
    .expect("Error loading glTF asset");

Looks up a top-level object by its identifier

Examples

Finding a buffer view:

let gltf = gltf::Gltf::new("./examples/box/Box.gltf").unwrap();
let buffer_view = gltf
    .find::<gltf::BufferView>("bufferView_29")
    .expect("Buffer view not found");

Trait Implementations

impl Debug for Gltf
[src]

Formats the value using the given formatter.

impl Find<Accessor> for Gltf
[src]

Attempts to find the object of type T with identifer id

impl Find<Buffer> for Gltf
[src]

Attempts to find the object of type T with identifer id

impl Find<BufferView> for Gltf
[src]

Attempts to find the object of type T with identifer id

impl Find<Material> for Gltf
[src]

Attempts to find the object of type T with identifer id

impl Find<Mesh> for Gltf
[src]

Attempts to find the object of type T with identifer id

impl Find<Program> for Gltf
[src]

Attempts to find the object of type T with identifer id

impl Find<Shader> for Gltf
[src]

Attempts to find the object of type T with identifer id

impl Find<Technique> for Gltf
[src]

Attempts to find the object of type T with identifer id