struct
Model
pub struct Model {
pub nodes: Vec<Node>,
pub meshes: Vec<ModelMesh>,
pub materials: Vec<ModelMaterial>,
pub textures: Vec<ModelTexture>,
pub animations: Vec<Animation>,
pub skins: Vec<Skin>,
}A loaded 3D model (glTF, OBJ, STL, PLY): its nodes, meshes, materials, textures and animations.
Fields
Methods
animation_index
pub fn animation_index(&self, which: &str) -> Option<usize>An animation by name, or by index ("0").
world_matrices
pub fn world_matrices(&self, animation: Option<(usize, f32)>) -> Vec<Mat4>Every node's world matrix, with animation at t seconds applied.
joint_matrices
pub fn joint_matrices(&self, skin: usize, world: &[Mat4]) -> Vec<f32>A skin's joint matrices (model space: each joint's world matrix times its inverse bind matrix) for the node matrices world, as 16 floats each.
skin_point
pub fn skin_point(mesh: &Mesh, v: usize, joints: &[f32]) -> Vec3Vertex v of mesh, skinned by joints (from [Model::joint_matrices]).
subtree
pub fn subtree(&self, name: Option<&str>) -> Vec<bool>The nodes in name's subtree (all of them for None, none if there's no such node).