31 const JointPhysicalProperties& properties,
46 const Character& character,
67 const Character& srcCharacter,
68 const Character& tgtCharacter,
69 const std::string& srcRootJoint,
70 const std::string& tgtRootJoint);
77 const Character& character,
86 const Character& targetCharacter);
99 const Character& targetCharacter);
105 const Character& character,
106 const std::vector<bool>& activeVertices);
112 const Character& character,
113 const std::vector<bool>& activeFaces);
124 const MeshT<T>& mesh,
125 const std::vector<bool>& activeVertices);
136 const MeshT<T>& mesh,
137 const std::vector<bool>& activeFaces);
143 const MeshT<T>& mesh,
144 const std::vector<bool>& activeVertices);
150 const MeshT<T>& mesh,
151 const std::vector<bool>& activeFaces);
157 const MeshT<T>& mesh,
158 const std::vector<bool>& activeVertices);
164 const MeshT<T>& mesh,
165 const std::vector<bool>& activePolys);
175 const MeshT<T>& mesh,
176 const std::vector<bool>& activePolys);
185 const Character& character,
186 const std::vector<bool>& activePolys);
206 const std::string& name,
207 const Eigen::Vector3f& translationOffset = Eigen::Vector3f::Zero(),
208 const Eigen::Quaternionf& preRotation = Eigen::Quaternionf::Identity());
SkeletonT< float > Skeleton
Affine3< float > Affine3f
std::tuple< std::vector< std::string >, JointParameters > IdentityParameters
A tuple of skeleton joint names and identity parameters.
Character 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 srcCharact...
Character removeJoints(const Character &character, momentum::span< const size_t > jointsToRemove)
Removes the specified joints and any joints parented beneath them from the character.
JointParameters mapIdentityToCharacter(const IdentityParameters &inputIdentity, const Character &targetCharacter)
Maps the input JointParameter vector to a target character by matching joint names.
std::vector< bool > facesToVertices(const MeshT< T > &mesh, const std::vector< bool > &activeFaces)
Converts a face selection to a vertex selection.
Character reduceMeshByVertices(const Character &character, const std::vector< bool > &activeVertices)
Reduces the character's mesh to only include the specified vertices and associated faces.
MatrixXf mapMotionToCharacter(const MotionParameters &inputMotion, const Character &targetCharacter)
Maps the input ModelParameter motion to a target character by matching model parameter names.
std::tuple< std::vector< std::string >, Eigen::MatrixXf > MotionParameters
A tuple of model parameter names and a matrix of poses across a sequence of frames.
std::vector< bool > verticesToPolys(const MeshT< T > &mesh, const std::vector< bool > &activeVertices)
Converts a vertex selection to a polygon selection.
JointParametersT< float > JointParameters
MeshT< T > reduceMeshByPolys(const MeshT< T > &mesh, const std::vector< bool > &activePolys)
Reduces a standalone mesh to only include the specified polygons and associated vertices.
RigidTransformNodeResult addRigidTransformNode(const Character &character, const std::string &name, const Eigen::Vector3f &translationOffset, const Eigen::Quaternionf &preRotation)
Adds a new root-level joint with 6 rigid DOF parameters (tx/ty/tz/rx/ry/rz) to a character.
std::vector< bool > polysToVertices(const MeshT< T > &mesh, const std::vector< bool > &activePolys)
Converts a polygon selection to a vertex selection.
gsl::span< T > span
Span type alias using gsl::span (C++17 fallback).
size_t resolvePhysicalPropertiesJointIndex(const JointPhysicalProperties &properties, const Skeleton &skeleton)
Resolves physical mass properties to a skeleton joint.
CharacterMassScale
Policy for choosing how physical mass changes when scaling a character.
@ PreserveDensity
Preserve density while scaling lengths, so mass changes with volume.
@ PreserveMass
Preserve total mass while scaling lengths. This is appropriate for unit conversions.
Character reduceMeshByFaces(const Character &character, const std::vector< bool > &activeFaces)
Reduces the character's mesh to only include the specified faces and associated vertices.
std::vector< bool > verticesToFaces(const MeshT< T > &mesh, const std::vector< bool > &activeVertices)
Converts a vertex selection to a face selection.
MatrixX< float > MatrixXf
Character transformCharacter(const Character &character, const Affine3f &xform)
Transforms the character (mesh and skeleton) by the desired transformation matrix.
Character scaleCharacter(const Character &character, float s, CharacterMassScale massScale)
Scales the character (mesh and skeleton) by the desired amount.
A character model with skeletal structure, mesh, and optional components.