|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
Linear blend skinning weights for a character mesh: per-vertex joint indices and influence weights. More...
#include <skin_weights.h>
Public Member Functions | |
| void | set (const std::vector< std::vector< size_t > > &ind, const std::vector< std::vector< float > > &wgt) |
| Populates index and weight from ragged per-vertex influence lists. | |
| bool | operator== (const SkinWeights &skinWeights) const |
| Approximate equality on index and weight using Eigen's isApprox. | |
Public Attributes | |
| IndexMatrix | index |
| Joint indices influencing each vertex. | |
| WeightMatrix | weight |
| Joint influence weights per vertex. | |
Linear blend skinning weights for a character mesh: per-vertex joint indices and influence weights.
index and weight always have the same row count (one row per vertex) and matching unused-slot conventions.
Definition at line 34 of file skin_weights.h.
| bool momentum::SkinWeights::operator== | ( | const SkinWeights & | skinWeights | ) | const |
| void momentum::SkinWeights::set | ( | const std::vector< std::vector< size_t > > & | ind, |
| const std::vector< std::vector< float > > & | wgt ) |
Populates index and weight from ragged per-vertex influence lists.
Each entry of ind/wgt is one vertex's joints/weights; influences beyond kMaxSkinJoints are silently dropped, and unused slots are zero-filled.
Definition at line 16 of file skin_weights.cpp.
References index, momentum::kMaxSkinJoints, MT_CHECK, and weight.
| IndexMatrix momentum::SkinWeights::index |
Joint indices influencing each vertex.
Unused slots are set to 0. Read in conjunction with weight — index 0 only contributes when its matching weight is non-zero.
Definition at line 38 of file skin_weights.h.
Referenced by momentum::applyInverseSSD(), momentum::applySSD(), momentum::applySSD(), momentum::closestPointOnMeshMatchingParent(), momentum::findCandidateTrianglesDfs(), momentum::detail_sdf_collision::findCommonAncestorForVertex(), momentum::getInverseSSDTransformation(), momentum::loadSkinWeightsFromUsd(), operator==(), momentum::Character::remapSkinWeights(), momentum::saveSkinWeightsToUsd(), and set().
| WeightMatrix momentum::SkinWeights::weight |
Joint influence weights per vertex.
Weights for a vertex are expected to sum to 1.0; unused slots are set to 0.0. Loaders/setters do not enforce normalization — callers are responsible for normalized input.
Definition at line 43 of file skin_weights.h.
Referenced by momentum::applyInverseSSD(), momentum::applySSD(), momentum::applySSD(), momentum::closestPointOnMeshMatchingParent(), momentum::findCandidateTrianglesDfs(), momentum::detail_sdf_collision::findCommonAncestorForVertex(), momentum::getInverseSSDTransformation(), momentum::loadSkinWeightsFromUsd(), operator==(), momentum::Character::remapSkinWeights(), momentum::saveSkinWeightsToUsd(), and set().