Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
character_utility.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  momentum

Functions

size_t momentum::resolvePhysicalPropertiesJointIndex (const JointPhysicalProperties &properties, const Skeleton &skeleton)
 Resolves physical mass properties to a skeleton joint.
Character momentum::scaleCharacter (const Character &character, float scale, CharacterMassScale massScale=CharacterMassScale::PreserveMass)
 Scales the character (mesh and skeleton) by the desired amount.
Character momentum::transformCharacter (const Character &character, const Affine3f &xform)
 Transforms the character (mesh and skeleton) by the desired transformation matrix.
Character momentum::replaceSkeletonHierarchy (const Character &srcCharacter, const Character &tgtCharacter, const std::string &srcRootJoint, const std::string &tgtRootJoint)
 Replaces the subtree of tgtCharacter's skeleton rooted at tgtRootJoint with the subtree of srcCharacter's skeleton rooted at srcRootJoint.
Character momentum::removeJoints (const Character &character, momentum::span< const size_t > jointsToRemove)
 Removes the specified joints and any joints parented beneath them from the character.
RigidTransformNodeResult momentum::addRigidTransformNode (const Character &character, const std::string &name, const Eigen::Vector3f &translationOffset=Eigen::Vector3f::Zero(), const Eigen::Quaternionf &preRotation=Eigen::Quaternionf::Identity())
 Adds a new root-level joint with 6 rigid DOF parameters (tx/ty/tz/rx/ry/rz) to a character.
MatrixXf momentum::mapMotionToCharacter (const MotionParameters &inputMotion, const Character &targetCharacter)
 Maps the input ModelParameter motion to a target character by matching model parameter names.
JointParameters momentum::mapIdentityToCharacter (const IdentityParameters &inputIdentity, const Character &targetCharacter)
 Maps the input JointParameter vector to a target character by matching joint names.
Character momentum::reduceMeshByVertices (const Character &character, const std::vector< bool > &activeVertices)
 Reduces the character's mesh to only include the specified vertices and associated faces.
Character momentum::reduceMeshByFaces (const Character &character, const std::vector< bool > &activeFaces)
 Reduces the character's mesh to only include the specified faces and associated vertices.
template<typename T>
MeshT< T > momentum::reduceMeshByVertices (const MeshT< T > &mesh, const std::vector< bool > &activeVertices)
 Reduces a standalone mesh to only include the specified vertices and associated faces.
template<typename T>
MeshT< T > momentum::reduceMeshByFaces (const MeshT< T > &mesh, const std::vector< bool > &activeFaces)
 Reduces a standalone mesh to only include the specified faces and associated vertices.
template<typename T>
std::vector< bool > momentum::verticesToFaces (const MeshT< T > &mesh, const std::vector< bool > &activeVertices)
 Converts a vertex selection to a face selection.
template<typename T>
std::vector< bool > momentum::facesToVertices (const MeshT< T > &mesh, const std::vector< bool > &activeFaces)
 Converts a face selection to a vertex selection.
template<typename T>
std::vector< bool > momentum::verticesToPolys (const MeshT< T > &mesh, const std::vector< bool > &activeVertices)
 Converts a vertex selection to a polygon selection.
template<typename T>
std::vector< bool > momentum::polysToVertices (const MeshT< T > &mesh, const std::vector< bool > &activePolys)
 Converts a polygon selection to a vertex selection.
template<typename T>
MeshT< T > momentum::reduceMeshByPolys (const MeshT< T > &mesh, const std::vector< bool > &activePolys)
 Reduces a standalone mesh to only include the specified polygons and associated vertices.
Character momentum::reduceMeshByPolys (const Character &character, const std::vector< bool > &activePolys)
 Reduces the character's mesh to only include the specified polygons and associated vertices.
template MeshT< float > momentum::reduceMeshByVertices< float > (const MeshT< float > &mesh, const std::vector< bool > &activeVertices)
template MeshT< double > momentum::reduceMeshByVertices< double > (const MeshT< double > &mesh, const std::vector< bool > &activeVertices)
template MeshT< float > momentum::reduceMeshByFaces< float > (const MeshT< float > &mesh, const std::vector< bool > &activeFaces)
template MeshT< double > momentum::reduceMeshByFaces< double > (const MeshT< double > &mesh, const std::vector< bool > &activeFaces)
template std::vector< bool > momentum::verticesToFaces< float > (const MeshT< float > &mesh, const std::vector< bool > &activeVertices)
template std::vector< bool > momentum::verticesToFaces< double > (const MeshT< double > &mesh, const std::vector< bool > &activeVertices)
template std::vector< bool > momentum::facesToVertices< float > (const MeshT< float > &mesh, const std::vector< bool > &activeFaces)
template std::vector< bool > momentum::facesToVertices< double > (const MeshT< double > &mesh, const std::vector< bool > &activeFaces)
template std::vector< bool > momentum::verticesToPolys< float > (const MeshT< float > &mesh, const std::vector< bool > &activeVertices)
template std::vector< bool > momentum::verticesToPolys< double > (const MeshT< double > &mesh, const std::vector< bool > &activeVertices)
template std::vector< bool > momentum::polysToVertices< float > (const MeshT< float > &mesh, const std::vector< bool > &activePolys)
template std::vector< bool > momentum::polysToVertices< double > (const MeshT< double > &mesh, const std::vector< bool > &activePolys)
template MeshT< float > momentum::reduceMeshByPolys< float > (const MeshT< float > &mesh, const std::vector< bool > &activePolys)
template MeshT< double > momentum::reduceMeshByPolys< double > (const MeshT< double > &mesh, const std::vector< bool > &activePolys)