Struct gltf::Gltf [−][src]
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.
Methods
impl Gltf
[src]
impl Gltf
pub fn open<P>(path: P) -> Result<Self> where
P: AsRef<Path>,
[src]
pub fn open<P>(path: P) -> Result<Self> where
P: AsRef<Path>,
Convenience function that loads glTF from the file system.
pub fn from_reader_without_validation<R>(reader: R) -> Result<Self> where
R: Read + Seek,
[src]
pub fn from_reader_without_validation<R>(reader: R) -> Result<Self> where
R: Read + Seek,
Loads glTF from a reader without performing validation checks.
pub fn from_reader<R>(reader: R) -> Result<Self> where
R: Read + Seek,
[src]
pub fn from_reader<R>(reader: R) -> Result<Self> where
R: Read + Seek,
Loads glTF from a reader.
pub fn from_slice_without_validation(slice: &[u8]) -> Result<Self>
[src]
pub fn from_slice_without_validation(slice: &[u8]) -> Result<Self>
Loads glTF from a slice of bytes without performing validation checks.
pub fn from_slice(slice: &[u8]) -> Result<Self>
[src]
pub fn from_slice(slice: &[u8]) -> Result<Self>
Loads glTF from a slice of bytes.
Methods from Deref<Target = Document>
ⓘImportant traits for Accessors<'a>pub fn accessors(&self) -> Accessors
[src]
pub fn accessors(&self) -> Accessors
Returns an Iterator
that visits the accessors of the glTF asset.
ⓘImportant traits for Animations<'a>pub fn animations(&self) -> Animations
[src]
pub fn animations(&self) -> Animations
Returns an Iterator
that visits the animations of the glTF asset.
ⓘImportant traits for Buffers<'a>pub fn buffers(&self) -> Buffers
[src]
pub fn buffers(&self) -> Buffers
Returns an Iterator
that visits the pre-loaded buffers of the glTF asset.
ⓘImportant traits for Cameras<'a>pub fn cameras(&self) -> Cameras
[src]
pub fn cameras(&self) -> Cameras
Returns an Iterator
that visits the cameras of the glTF asset.
pub fn default_scene(&self) -> Option<Scene>
[src]
pub fn default_scene(&self) -> Option<Scene>
Returns the default scene, if provided.
ⓘImportant traits for ExtensionsUsed<'a>pub fn extensions_used(&self) -> ExtensionsUsed
[src]
pub fn extensions_used(&self) -> ExtensionsUsed
Returns the extensions referenced in this .document file.
ⓘImportant traits for ExtensionsRequired<'a>pub fn extensions_required(&self) -> ExtensionsRequired
[src]
pub fn extensions_required(&self) -> ExtensionsRequired
Returns the extensions required to load and render this asset.
ⓘImportant traits for Images<'a>pub fn images(&self) -> Images
[src]
pub fn images(&self) -> Images
Returns an Iterator
that visits the pre-loaded images of the glTF asset.
ⓘImportant traits for Materials<'a>pub fn materials(&self) -> Materials
[src]
pub fn materials(&self) -> Materials
Returns an Iterator
that visits the materials of the glTF asset.
ⓘImportant traits for Meshes<'a>pub fn meshes(&self) -> Meshes
[src]
pub fn meshes(&self) -> Meshes
Returns an Iterator
that visits the meshes of the glTF asset.
ⓘImportant traits for Nodes<'a>pub fn nodes(&self) -> Nodes
[src]
pub fn nodes(&self) -> Nodes
Returns an Iterator
that visits the nodes of the glTF asset.
ⓘImportant traits for Samplers<'a>pub fn samplers(&self) -> Samplers
[src]
pub fn samplers(&self) -> Samplers
Returns an Iterator
that visits the samplers of the glTF asset.
ⓘImportant traits for Scenes<'a>pub fn scenes(&self) -> Scenes
[src]
pub fn scenes(&self) -> Scenes
Returns an Iterator
that visits the scenes of the glTF asset.
ⓘImportant traits for Skins<'a>pub fn skins(&self) -> Skins
[src]
pub fn skins(&self) -> Skins
Returns an Iterator
that visits the skins of the glTF asset.
ⓘImportant traits for Textures<'a>pub fn textures(&self) -> Textures
[src]
pub fn textures(&self) -> Textures
Returns an Iterator
that visits the textures of the glTF asset.
ⓘImportant traits for Views<'a>pub fn views(&self) -> Views
[src]
pub fn views(&self) -> Views
Returns an Iterator
that visits the pre-loaded buffer views of the glTF
asset.
Trait Implementations
impl Clone for Gltf
[src]
impl Clone for Gltf
fn clone(&self) -> Gltf
[src]
fn clone(&self) -> Gltf
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Gltf
[src]
impl Debug for Gltf
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Deref for Gltf
[src]
impl Deref for Gltf
type Target = Document
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
fn deref(&self) -> &Self::Target
Dereferences the value.
impl DerefMut for Gltf
[src]
impl DerefMut for Gltf