[go: up one dir, main page]

Struct gltf::Gltf [] [src]

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

'Raw' glTF data structure that closely matches the structure of a .gltf file

Fields

Methods

impl Gltf
[src]

Loads a glTF asset

Examples

Basic usage:

let gltf = Gltf::new("foo.gltf").expect("Error loading glTF asset");

Looks up a top-level object by its identifier

Examples

Finding a buffer view:

use gltf::{BufferView, Gltf};
let gltf = Gltf::new("foo.gltf").unwrap();
let buffer_view = gltf
    .find::<BufferView>("bufferView-123")
    .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 with the given type and identifer

impl Find<Buffer> for Gltf
[src]

Attempts to find the object with the given type and identifer

impl Find<BufferView> for Gltf
[src]

Attempts to find the object with the given type and identifer

impl Find<Material> for Gltf
[src]

Attempts to find the object with the given type and identifer

impl Find<Mesh> for Gltf
[src]

Attempts to find the object with the given type and identifer

impl Find<Program> for Gltf
[src]

Attempts to find the object with the given type and identifer

impl Find<Shader> for Gltf
[src]

Attempts to find the object with the given type and identifer

impl Find<Technique> for Gltf
[src]

Attempts to find the object with the given type and identifer