107 void Map(
const Mat44 *inPose1ModelSpace,
const Mat44 *inPose2LocalSpace,
Mat44 *outPose2ModelSpace)
const;
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
std::vector< T, STLAllocator< T > > Array
Definition STLAllocator.h:81
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
int GetMappedJointIdx(int inJoint1Idx) const
Search through the directly mapped joints (mMappings) and find inJoint1Idx, returns the corresponding...
Definition SkeletonMapper.cpp:219
void LockTranslations(const Skeleton *inSkeleton2, const bool *inLockedTranslations, const Mat44 *inNeutralPose2)
Definition SkeletonMapper.cpp:112
Array< Chain > ChainVector
Definition SkeletonMapper.h:121
const UnmappedVector & GetUnmapped() const
Definition SkeletonMapper.h:131
void Initialize(const Skeleton *inSkeleton1, const Mat44 *inNeutralPose1, const Skeleton *inSkeleton2, const Mat44 *inNeutralPose2, const CanMapJoint &inCanMapJoint=sDefaultCanMapJoint)
Definition SkeletonMapper.cpp:11
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
void MapReverse(const Mat44 *inPose2ModelSpace, Mat44 *outPose1ModelSpace) const
Definition SkeletonMapper.cpp:212
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
bool IsJointTranslationLocked(int inJoint2Idx) const
Search through the locked translations (mLockedTranslations) and find if joint inJoint2Idx is locked.
Definition SkeletonMapper.cpp:228
Array< Locked > LockedVector
Definition SkeletonMapper.h:123
LockedVector & GetLockedTranslations()
Definition SkeletonMapper.h:134
void Map(const Mat44 *inPose1ModelSpace, const Mat44 *inPose2LocalSpace, Mat44 *outPose2ModelSpace) const
Definition SkeletonMapper.cpp:165
void LockAllTranslations(const Skeleton *inSkeleton2, const Mat44 *inNeutralPose2)
Definition SkeletonMapper.cpp:133
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
Definition Reference.h:207