Fix Node/Skeleton uint32->size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
This commit is contained in:
@@ -27,10 +27,10 @@ namespace EMotionFX
|
||||
void CreateSubMotionLikeBindPose(const std::string& name)
|
||||
{
|
||||
const Skeleton* skeleton = m_actor->GetSkeleton();
|
||||
AZ::u32 jointIndex = InvalidIndex32;
|
||||
size_t jointIndex = InvalidIndex;
|
||||
const Node* node = skeleton->FindNodeAndIndexByName(name.c_str(), jointIndex);
|
||||
ASSERT_NE(node, nullptr);
|
||||
ASSERT_NE(jointIndex, InvalidIndex32);
|
||||
ASSERT_NE(jointIndex, InvalidIndex);
|
||||
|
||||
const Pose* bindPose = m_actorInstance->GetTransformData()->GetBindPose();
|
||||
const Transform& transform = bindPose->GetLocalSpaceTransform(jointIndex);
|
||||
@@ -41,7 +41,7 @@ namespace EMotionFX
|
||||
{
|
||||
// Find and store the joint index.
|
||||
const Skeleton* skeleton = m_actor->GetSkeleton();
|
||||
AZ::u32 jointIndex = InvalidIndex32;
|
||||
size_t jointIndex = InvalidIndex;
|
||||
const Node* node = skeleton->FindNodeAndIndexByName(name.c_str(), jointIndex);
|
||||
ASSERT_NE(node, nullptr);
|
||||
ASSERT_NE(jointIndex, InvalidIndex32);
|
||||
@@ -91,9 +91,9 @@ namespace EMotionFX
|
||||
protected:
|
||||
Motion* m_motion = nullptr;
|
||||
MotionInstance* m_motionInstance = nullptr; // Automatically deleted internally when deleting the actor instance.
|
||||
std::vector<AZ::u32> m_jointIndices;
|
||||
std::vector<size_t> m_jointIndices;
|
||||
std::vector<std::string> m_jointNames { "l_upLeg", "l_loLeg", "l_ankle" };
|
||||
AZ::u32 m_footIndex = InvalidIndex32;
|
||||
size_t m_footIndex = InvalidIndex;
|
||||
};
|
||||
|
||||
TEST_F(MotionSamplingFixture, SampleAdditiveJoint)
|
||||
@@ -102,7 +102,7 @@ namespace EMotionFX
|
||||
|
||||
// Sample the joints that exist in our actor skeleton as well as inside the motion data.
|
||||
const Pose* bindPose = m_actorInstance->GetTransformData()->GetBindPose();
|
||||
for (AZ::u32 jointIndex : m_jointIndices)
|
||||
for (size_t jointIndex : m_jointIndices)
|
||||
{
|
||||
// Sample the motion.
|
||||
Transform transform = Transform::CreateZero(); // Set all to Zero, not identity as this methods might return identity and we want to verify that.
|
||||
@@ -140,7 +140,7 @@ namespace EMotionFX
|
||||
|
||||
// Test if the joints that exist in both motion and actor have the expected transforms.
|
||||
const Pose* bindPose = m_actorInstance->GetTransformData()->GetBindPose();
|
||||
for (AZ::u32 jointIndex : m_jointIndices)
|
||||
for (size_t jointIndex : m_jointIndices)
|
||||
{
|
||||
const Transform& transform = pose.GetLocalSpaceTransform(jointIndex);
|
||||
const Transform& bindTransform = bindPose->GetLocalSpaceTransform(jointIndex);
|
||||
|
||||
Reference in New Issue
Block a user