21 Mapping(
int inJointIdx1,
int inJointIdx2,
Mat44Arg inJoint1To2) : mJointIdx1(inJointIdx1), mJointIdx2(inJointIdx2), mJoint1To2(inJoint1To2), mJoint2To1(inJoint1To2.Inversed())
24 mJoint2To1(3, 3) = 1.0f;
49 Unmapped(
int inJointIdx,
int inParentJointIdx) : mJointIdx(inJointIdx), mParentJointIdx(inParentJointIdx) { }
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:236
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
Definition Reference.h:35
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
A joint chain that starts with a 1-on-1 mapped joint and ends with a 1-on-1 mapped joint with interme...
Definition SkeletonMapper.h:35
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
A joint that maps 1-on-1 to a joint in the other skeleton.
Definition SkeletonMapper.h:18
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
Joints that could not be mapped from skeleton 1 to 2.
Definition SkeletonMapper.h:46
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
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
LockedVector & GetLockedTranslations()
Definition SkeletonMapper.h:134
const ChainVector & GetChains() const
Definition SkeletonMapper.h:129
UnmappedVector & GetUnmapped()
Definition SkeletonMapper.h:132
const LockedVector & GetLockedTranslations() const
Definition SkeletonMapper.h:133