Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
gltf_mesh_io.h File Reference
#include <momentum/character/blend_shape.h>
#include <momentum/character/skin_weights.h>
#include <momentum/character/types.h>
#include <momentum/math/mesh.h>
#include <fx/gltf.h>
#include <tuple>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  momentum

Functions

size_t momentum::addMesh (const fx::gltf::Document &model, const fx::gltf::Primitive &primitive, Mesh_u &mesh)
 Add mesh data from a glTF primitive.
size_t momentum::addBlendShapes (const fx::gltf::Document &model, const fx::gltf::Primitive &primitive, BlendShape_u &blendShape)
 Add blend shapes from a glTF primitive.
std::vector< Vector4f > momentum::loadWeightsFromAccessor (const fx::gltf::Document &model, int32_t accessorIdx)
 Load skin weights from a glTF accessor.
void momentum::addSkinWeights (const fx::gltf::Document &model, const fx::gltf::Skin &skin, const fx::gltf::Primitive &primitive, const std::vector< size_t > &nodeToObjectMap, size_t kNumVertices, SkinWeights_u &skinWeights)
 Add skin weights from a glTF primitive.
std::tuple< Mesh_u, SkinWeights_u, BlendShape_u > momentum::loadSkinnedMesh (const fx::gltf::Document &model, const std::vector< size_t > &meshNodes, const std::vector< size_t > &nodeToObjectMap)
 Load skinned mesh, skin weights, and blend shapes from the model.
SkinWeights_u momentum::bindMeshToJoint (const Mesh_u &mesh, size_t jointId)
 Bind a mesh to a single joint.