Struct gltf::Gltf [−][src]
Expand description
glTF JSON wrapper plus binary payload.
Fields
document: DocumentExpand description
The glTF JSON wrapper.
blob: Option<Vec<u8>>Expand description
The glTF binary payload in the case of binary glTF.
Implementations
impl Gltf[src]
impl Gltf[src]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>, [src]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, [src]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, [src]Loads glTF from a reader.
Methods from Deref<Target = Document>
pub fn accessors(&self) -> Accessors<'_>ⓘ[src]
pub fn accessors(&self) -> Accessors<'_>ⓘ[src]Returns an Iterator that visits the accessors of the glTF asset.
pub fn animations(&self) -> Animations<'_>ⓘNotable traits for Animations<'a>
impl<'a> Iterator for Animations<'a> type Item = Animation<'a>;[src]
pub fn animations(&self) -> Animations<'_>ⓘNotable traits for Animations<'a>
impl<'a> Iterator for Animations<'a> type Item = Animation<'a>;[src]Returns an Iterator that visits the animations of the glTF asset.
pub fn buffers(&self) -> Buffers<'_>ⓘ[src]
pub fn buffers(&self) -> Buffers<'_>ⓘ[src]Returns an Iterator that visits the pre-loaded buffers of the glTF asset.
pub fn cameras(&self) -> Cameras<'_>ⓘ[src]
pub fn cameras(&self) -> Cameras<'_>ⓘ[src]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<'_>>[src]Returns the default scene, if provided.
pub fn extensions_used(&self) -> ExtensionsUsed<'_>ⓘNotable traits for ExtensionsUsed<'a>
impl<'a> Iterator for ExtensionsUsed<'a> type Item = &'a str;[src]
pub fn extensions_used(&self) -> ExtensionsUsed<'_>ⓘNotable traits for ExtensionsUsed<'a>
impl<'a> Iterator for ExtensionsUsed<'a> type Item = &'a str;[src]Returns the extensions referenced in this .document file.
pub fn extensions_required(&self) -> ExtensionsRequired<'_>ⓘNotable traits for ExtensionsRequired<'a>
impl<'a> Iterator for ExtensionsRequired<'a> type Item = &'a str;[src]
pub fn extensions_required(&self) -> ExtensionsRequired<'_>ⓘNotable traits for ExtensionsRequired<'a>
impl<'a> Iterator for ExtensionsRequired<'a> type Item = &'a str;[src]Returns the extensions required to load and render this asset.
pub fn images(&self) -> Images<'_>ⓘ[src]
pub fn images(&self) -> Images<'_>ⓘ[src]Returns an Iterator that visits the pre-loaded images of the glTF asset.
pub fn lights(&self) -> Option<Lights<'_>>[src]
This is supported on crate feature KHR_lights_punctual only.
pub fn lights(&self) -> Option<Lights<'_>>[src]KHR_lights_punctual only.Returns an Iterator that visits the lights of the glTF asset as defined by the
KHR_lights_punctual extension.
pub fn materials(&self) -> Materials<'_>ⓘ[src]
pub fn materials(&self) -> Materials<'_>ⓘ[src]Returns an Iterator that visits the materials of the glTF asset.
pub fn meshes(&self) -> Meshes<'_>ⓘ[src]
pub fn meshes(&self) -> Meshes<'_>ⓘ[src]Returns an Iterator that visits the meshes of the glTF asset.
pub fn samplers(&self) -> Samplers<'_>ⓘ[src]
pub fn samplers(&self) -> Samplers<'_>ⓘ[src]Returns an Iterator that visits the samplers of the glTF asset.
pub fn scenes(&self) -> Scenes<'_>ⓘ[src]
pub fn scenes(&self) -> Scenes<'_>ⓘ[src]Returns an Iterator that visits the scenes of the glTF asset.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Gltf
impl Send for Gltf
impl Sync for Gltf
impl Unpin for Gltf
impl UnwindSafe for Gltf
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more