Expand description
gltf scene and model loader for rend3.
This crate attempts to map the concepts into gltf as best it can into rend3, but there is quite a variety of things that would be insane to properly represent.
To “just load a gltf/glb”, look at the documentation for load_gltf
and
use the default filesystem_io_func
.
Individual components of a gltf can be loaded with the other functions in this crate.
§Supported Extensions
KHR_punctual_lights
KHR_texture_transform
KHR_material_unlit
§Known Limitations
- Only the albedo texture’s transform from
KHR_texture_transform
will be used. - Double sided materials are currently unsupported.
Modules§
- Implementation utilities.
Structs§
- A set of
SkeletonHandle
s, one per mesh in the wrapping object, plus the index of the skin data in theskins
array ofLoadedGltfScene
. - Determines parameters that are given to various parts of the gltf world that cannot be specified by gltf alone.
- Data specific to each instance of a gltf scene.
- Hashmap key for caching images.
- Wrapper around a T that stores an optional label.
- Loaded data on a gltf scene that can be reused across multiple instances of the same set of objects.
- Set of
MeshPrimitive
s that make up a logical mesh. - A single sub-mesh of a gltf.
- Node in the gltf scene tree
- Set of
ObjectHandle
s that correspond to a logical object in the node tree. When the node corresponds to an animated mesh, thearmature
will contain the necessary data to deform the primitives. - Animation data for a single joint, with translation, rotation and scale channels.
- A uploaded texture and its format.
Enums§
- Describes how loading gltf failed.
Functions§
- Adds a single mesh from the
LoadedGltfScene
found by its index, as an object to the scene. - Default implementation of
load_gltf
’sio_func
that loads from the filesystem relative to the gltf. - Instances a Gltf scene that has been loaded using
load_gltf_data
. Will create as manyObject
s as required. - Loads buffers from a
gltf::Buffer
iterator, calling io_func to resolve them from URI. - Creates a gltf default material.
- Load a given gltf into the renderer’s world.
- Load a given gltf’s data, like meshes and materials, without yet adding any of the nodes to the scene.
- Loads a single image from a
gltf::Image
. - Loads a single image from a
gltf::Image
, with caching. - Loads materials and textures from a
gltf::Material
iterator. - Loads meshes from a
gltf::Mesh
iterator.
Type Aliases§
- Hashmap which stores a mapping from
ImageKey
to a labeled handle.