pub struct Gltf {
pub document: Document,
pub blob: Option<Vec<u8>>,
}Expand description
glTF JSON wrapper plus binary payload.
Fields§
§document: DocumentThe glTF JSON wrapper.
blob: Option<Vec<u8>>The glTF binary payload in the case of binary glTF.
Implementations§
Source§impl Gltf
impl Gltf
Sourcepub fn open<P>(path: P) -> Result<Self>
pub fn open<P>(path: P) -> Result<Self>
Convenience function that loads glTF from the file system.
Sourcepub fn from_reader_without_validation<R>(reader: R) -> Result<Self>
pub fn from_reader_without_validation<R>(reader: R) -> Result<Self>
Loads glTF from a reader without performing validation checks.
Sourcepub fn from_reader<R>(reader: R) -> Result<Self>
pub fn from_reader<R>(reader: R) -> Result<Self>
Loads glTF from a reader.
pub fn from_slice_without_validation(slice: &[u8]) -> Result<Self>
pub fn from_slice(slice: &[u8]) -> Result<Self>
Methods from Deref<Target = Document>§
pub fn as_json(&self) -> &Root
pub fn default_scene(&self) -> Option<Scene<'_>>
pub fn accessors(&self) -> Accessors<'_> ⓘ
pub fn buffers(&self) -> Buffers<'_> ⓘ
pub fn views(&self) -> Views<'_> ⓘ
pub fn images(&self) -> Images<'_> ⓘ
pub fn textures(&self) -> Textures<'_> ⓘ
pub fn samplers(&self) -> Samplers<'_> ⓘ
pub fn materials(&self) -> Materials<'_> ⓘ
pub fn techniques(&self) -> Techniques<'_> ⓘ
pub fn meshes(&self) -> Meshes<'_> ⓘ
pub fn cameras(&self) -> Cameras<'_> ⓘ
pub fn nodes(&self) -> Nodes<'_> ⓘ
pub fn skins(&self) -> Skins<'_> ⓘ
pub fn scenes(&self) -> Scenes<'_> ⓘ
pub fn lights(&self) -> Option<Lights<'_>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gltf
impl RefUnwindSafe for Gltf
impl Send for Gltf
impl Sync for Gltf
impl Unpin for Gltf
impl UnwindSafe for Gltf
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more