81 void Initialize(
const Skeleton *inSkeleton1,
const Mat44 *inNeutralPose1,
const Skeleton *inSkeleton2,
const Mat44 *inNeutralPose2,
const CanMapJoint &inCanMapJoint = sDefaultCanMapJoint);
90 void LockTranslations(
const Skeleton *inSkeleton2,
const bool *inLockedTranslations,
const Mat44 *inNeutralPose2);
98 void LockAllTranslations(
const Skeleton *inSkeleton2,
const Mat44 *inNeutralPose2);
107 void Map(
const Mat44 *inPose1ModelSpace,
const Mat44 *inPose2LocalSpace,
Mat44 *outPose2ModelSpace)
const;
112 void MapReverse(
const Mat44 *inPose2ModelSpace,
Mat44 *outPose1ModelSpace)
const;
115 int GetMappedJointIdx(
int inJoint1Idx)
const;
118 bool IsJointTranslationLocked(
int inJoint2Idx)
const;
139 MappingVector mMappings;
141 UnmappedVector mUnmapped;
142 LockedVector mLockedTranslations;
#define JPH_EXPORT
Definition Core.h:275
#define JPH_NAMESPACE_END
Definition Core.h:425
#define JPH_NAMESPACE_BEGIN
Definition Core.h:419
const Mat44 & Mat44Arg
Definition MathTypes.h:29
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
String mName
Name of the joint.
Definition Skeleton.h:33
Resource that contains the joint hierarchy for a skeleton.
Definition Skeleton.h:18
const Joint & GetJoint(int inJoint) const
Definition Skeleton.h:45
Chain(Array< int > &&inJointIndices1, Array< int > &&inJointIndices2)
Definition SkeletonMapper.h:38
Array< int > mJointIndices1
Joint chain from skeleton 1.
Definition SkeletonMapper.h:40
Array< int > mJointIndices2
Corresponding joint chain from skeleton 2.
Definition SkeletonMapper.h:41
Joints that should have their translation locked (fixed).
Definition SkeletonMapper.h:57
int mJointIdx
Joint index of joint with locked translation (in skeleton 2).
Definition SkeletonMapper.h:59
Vec3 mTranslation
Translation of neutral pose.
Definition SkeletonMapper.h:61
int mParentJointIdx
Parent joint index of joint with locked translation (in skeleton 2).
Definition SkeletonMapper.h:60
Mat44 mJoint1To2
Transforms this joint from skeleton 1 to 2.
Definition SkeletonMapper.h:29
Mat44 mJoint2To1
Inverse of the transform above.
Definition SkeletonMapper.h:30
Mapping(int inJointIdx1, int inJointIdx2, Mat44Arg inJoint1To2)
Definition SkeletonMapper.h:21
int mJointIdx1
Index of joint from skeleton 1.
Definition SkeletonMapper.h:27
int mJointIdx2
Corresponding index of joint from skeleton 2.
Definition SkeletonMapper.h:28
Unmapped(int inJointIdx, int inParentJointIdx)
Definition SkeletonMapper.h:49
int mJointIdx
Joint index of unmappable joint.
Definition SkeletonMapper.h:51
int mParentJointIdx
Parent joint index of unmappable joint.
Definition SkeletonMapper.h:52
Class that is able to map a low detail (ragdoll) skeleton to a high detail (animation) skeleton and v...
Definition SkeletonMapper.h:14
MappingVector & GetMappings()
Definition SkeletonMapper.h:128
const MappingVector & GetMappings() const
Definition SkeletonMapper.h:127
Array< Chain > ChainVector
Definition SkeletonMapper.h:121
const UnmappedVector & GetUnmapped() const
Definition SkeletonMapper.h:131
ChainVector & GetChains()
Definition SkeletonMapper.h:130
static bool sDefaultCanMapJoint(const Skeleton *inSkeleton1, int inIndex1, const Skeleton *inSkeleton2, int inIndex2)
Default function that checks if the names of the joints are equal.
Definition SkeletonMapper.h:68
function< bool(const Skeleton *, int, const Skeleton *, int)> CanMapJoint
A function that is called to determine if a joint can be mapped from source to target skeleton.
Definition SkeletonMapper.h:65
Array< Mapping > MappingVector
Definition SkeletonMapper.h:120
Array< Locked > LockedVector
Definition SkeletonMapper.h:123
LockedVector & GetLockedTranslations()
Definition SkeletonMapper.h:134
const ChainVector & GetChains() const
Definition SkeletonMapper.h:129
UnmappedVector & GetUnmapped()
Definition SkeletonMapper.h:132
Array< Unmapped > UnmappedVector
Definition SkeletonMapper.h:122
const LockedVector & GetLockedTranslations() const
Definition SkeletonMapper.h:133