Rename EMotionFX class members to follow the m_ naming convention
Signed-off-by: Chris Burel <burelc@amazon.com>
This commit is contained in:
@@ -28,13 +28,13 @@ namespace EMotionFX
|
||||
{
|
||||
struct BlendTreeTwoLinkIKNodeTestsData
|
||||
{
|
||||
AZStd::string testJointName;
|
||||
std::vector<AZStd::string> linkedJointNames;
|
||||
std::vector<std::vector<float>> reachablePositions;
|
||||
std::vector<std::vector<float>> unreachablePositions;
|
||||
std::vector<std::vector<float>> rotations;
|
||||
std::vector<float> bendDirPosition;
|
||||
std::vector<AZStd::string> alignToNodeNames;
|
||||
AZStd::string m_testJointName;
|
||||
std::vector<AZStd::string> m_linkedJointNames;
|
||||
std::vector<std::vector<float>> m_reachablePositions;
|
||||
std::vector<std::vector<float>> m_unreachablePositions;
|
||||
std::vector<std::vector<float>> m_rotations;
|
||||
std::vector<float> m_bendDirPosition;
|
||||
std::vector<AZStd::string> m_alignToNodeNames;
|
||||
};
|
||||
|
||||
class BlendTreeTwoLinkIKNodeFixture
|
||||
@@ -70,7 +70,7 @@ namespace EMotionFX
|
||||
m_paramNode = aznew BlendTreeParameterNode();
|
||||
m_twoLinkIKNode = aznew BlendTreeTwoLinkIKNode();
|
||||
|
||||
m_twoLinkIKNode->SetEndNodeName(m_param.testJointName);
|
||||
m_twoLinkIKNode->SetEndNodeName(m_param.m_testJointName);
|
||||
|
||||
m_blendTree = aznew BlendTree();
|
||||
m_blendTree->AddChildNode(bindPoseNode);
|
||||
@@ -137,9 +137,9 @@ namespace EMotionFX
|
||||
TEST_P(BlendTreeTwoLinkIKNodeFixture, ReachablePositionsOutputCorrectPose)
|
||||
{
|
||||
// Set values for vector3 and twoLinkIKNode weight parameter
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const float weight = testing::get<0>(GetParam());
|
||||
@@ -148,10 +148,10 @@ namespace EMotionFX
|
||||
// Remeber specific joint's original position to compare with its new position later
|
||||
const Pose* jackPose = m_actorInstance->GetTransformData()->GetCurrentPose();
|
||||
size_t testJointIndex;
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.testJointName, testJointIndex);
|
||||
const AZ::Vector3& testJointPos = jackPose->GetModelSpaceTransform(testJointIndex).mPosition;
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.m_testJointName, testJointIndex);
|
||||
const AZ::Vector3& testJointPos = jackPose->GetModelSpaceTransform(testJointIndex).m_position;
|
||||
|
||||
for (std::vector<float> goalPosXYZ : m_param.reachablePositions)
|
||||
for (std::vector<float> goalPosXYZ : m_param.m_reachablePositions)
|
||||
{
|
||||
const float goalX = goalPosXYZ[0];
|
||||
const float goalY = goalPosXYZ[1];
|
||||
@@ -159,7 +159,7 @@ namespace EMotionFX
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("GoalPosParam", AZ::Vector3(goalX, goalY, goalZ));
|
||||
|
||||
GetEMotionFX().Update(5.0f / 60.0f);
|
||||
const AZ::Vector3& testJointNewPos = jackPose->GetModelSpaceTransform(testJointIndex).mPosition;
|
||||
const AZ::Vector3& testJointNewPos = jackPose->GetModelSpaceTransform(testJointIndex).m_position;
|
||||
|
||||
// Based on weight, check if position of node changes to reachable goal position
|
||||
if (weight)
|
||||
@@ -179,7 +179,7 @@ namespace EMotionFX
|
||||
|
||||
TEST_P(BlendTreeTwoLinkIKNodeFixture, ReachableAlignToNodeOutputCorrectPose)
|
||||
{
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->mPortID,
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->m_portId,
|
||||
BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
@@ -188,26 +188,26 @@ namespace EMotionFX
|
||||
|
||||
const Pose* jackPose = m_actorInstance->GetTransformData()->GetCurrentPose();
|
||||
size_t testJointIndex;
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.testJointName, testJointIndex);
|
||||
const AZ::Vector3& testJointPos = jackPose->GetModelSpaceTransform(testJointIndex).mPosition;
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.m_testJointName, testJointIndex);
|
||||
const AZ::Vector3& testJointPos = jackPose->GetModelSpaceTransform(testJointIndex).m_position;
|
||||
|
||||
for (AZStd::string& nodeName : m_param.alignToNodeNames)
|
||||
for (AZStd::string& nodeName : m_param.m_alignToNodeNames)
|
||||
{
|
||||
NodeAlignmentData alignToNode;
|
||||
alignToNode.first = nodeName;
|
||||
alignToNode.second = 0;
|
||||
m_twoLinkIKNode->SetAlignToNode(alignToNode);
|
||||
|
||||
// Update will set uniqueData->mMustUpdate to false for efficiency purposes
|
||||
// Unique data only updates once unless reset mMustUpdate to true again
|
||||
// Update will set uniqueData->m_mustUpdate to false for efficiency purposes
|
||||
// Unique data only updates once unless reset m_mustUpdate to true again
|
||||
BlendTreeTwoLinkIKNode::UniqueData* uniqueData = static_cast<BlendTreeTwoLinkIKNode::UniqueData*>(m_animGraphInstance->FindOrCreateUniqueNodeData(m_twoLinkIKNode));
|
||||
uniqueData->Invalidate();
|
||||
size_t alignToNodeIndex;
|
||||
m_jackSkeleton->FindNodeAndIndexByName(nodeName, alignToNodeIndex);
|
||||
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3& alignToNodePos = jackPose->GetModelSpaceTransform(alignToNodeIndex).mPosition;
|
||||
const AZ::Vector3& testJointNewPos = jackPose->GetModelSpaceTransform(testJointIndex).mPosition;
|
||||
const AZ::Vector3& alignToNodePos = jackPose->GetModelSpaceTransform(alignToNodeIndex).m_position;
|
||||
const AZ::Vector3& testJointNewPos = jackPose->GetModelSpaceTransform(testJointIndex).m_position;
|
||||
|
||||
// Based on weight, check if position of node changes to alignToNode position
|
||||
if (weight)
|
||||
@@ -224,10 +224,10 @@ namespace EMotionFX
|
||||
|
||||
TEST_P(BlendTreeTwoLinkIKNodeFixture, UnreachablePositionsOutputCorrectPose)
|
||||
{
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->mPortID,
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->m_portId,
|
||||
BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const float weight = testing::get<0>(GetParam());
|
||||
@@ -237,12 +237,12 @@ namespace EMotionFX
|
||||
size_t testJointIndex;
|
||||
size_t linkedJoint0Index;
|
||||
size_t linkedJoint1Index;
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.testJointName, testJointIndex);
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.linkedJointNames[0], linkedJoint0Index);
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.linkedJointNames[1], linkedJoint1Index);
|
||||
const AZ::Vector3& testJointPos = jackPose->GetModelSpaceTransform(testJointIndex).mPosition;
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.m_testJointName, testJointIndex);
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.m_linkedJointNames[0], linkedJoint0Index);
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.m_linkedJointNames[1], linkedJoint1Index);
|
||||
const AZ::Vector3& testJointPos = jackPose->GetModelSpaceTransform(testJointIndex).m_position;
|
||||
|
||||
for (std::vector<float> goalPosXYZ : m_param.unreachablePositions)
|
||||
for (std::vector<float> goalPosXYZ : m_param.m_unreachablePositions)
|
||||
{
|
||||
const float goalX = goalPosXYZ[0];
|
||||
const float goalY = goalPosXYZ[1];
|
||||
@@ -250,9 +250,9 @@ namespace EMotionFX
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("GoalPosParam", AZ::Vector3(goalX, goalY, goalZ));
|
||||
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3& testJointNewPos = jackPose->GetModelSpaceTransform(testJointIndex).mPosition;
|
||||
const AZ::Vector3& linkedJoint0Pos = jackPose->GetModelSpaceTransform(linkedJoint0Index).mPosition;
|
||||
const AZ::Vector3& linkedJoint1Pos = jackPose->GetModelSpaceTransform(linkedJoint1Index).mPosition;
|
||||
const AZ::Vector3& testJointNewPos = jackPose->GetModelSpaceTransform(testJointIndex).m_position;
|
||||
const AZ::Vector3& linkedJoint0Pos = jackPose->GetModelSpaceTransform(linkedJoint0Index).m_position;
|
||||
const AZ::Vector3& linkedJoint1Pos = jackPose->GetModelSpaceTransform(linkedJoint1Index).m_position;
|
||||
|
||||
// Based on weight, check if position of the test node
|
||||
// And its linked nodes are pointing towards the unreachable position
|
||||
@@ -272,12 +272,12 @@ namespace EMotionFX
|
||||
|
||||
TEST_P(BlendTreeTwoLinkIKNodeFixture, RotatedPositionsOutputCorrectPose)
|
||||
{
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->mPortID,
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->m_portId,
|
||||
BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
m_paramNode->FindOutputPortByName("RotationParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_GOALROT);
|
||||
m_paramNode->FindOutputPortByName("RotationParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_GOALROT);
|
||||
m_twoLinkIKNode->SetRotationEnabled(true);
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
|
||||
@@ -288,10 +288,10 @@ namespace EMotionFX
|
||||
|
||||
const Pose* jackPose = m_actorInstance->GetTransformData()->GetCurrentPose();
|
||||
size_t testJointIndex;
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.testJointName, testJointIndex);
|
||||
const AZ::Quaternion testJointRotation = jackPose->GetModelSpaceTransform(testJointIndex).mRotation;
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.m_testJointName, testJointIndex);
|
||||
const AZ::Quaternion testJointRotation = jackPose->GetModelSpaceTransform(testJointIndex).m_rotation;
|
||||
|
||||
for (std::vector<float> rotateXYZ : m_param.rotations)
|
||||
for (std::vector<float> rotateXYZ : m_param.m_rotations)
|
||||
{
|
||||
const float rotateX = rotateXYZ[0];
|
||||
const float rotateY = rotateXYZ[1];
|
||||
@@ -299,7 +299,7 @@ namespace EMotionFX
|
||||
ParamSetValue<MCore::AttributeQuaternion, AZ::Quaternion>("RotationParam", AZ::Quaternion(rotateX, rotateY, rotateZ, 1.0f));
|
||||
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Quaternion testJointNewRotation = jackPose->GetModelSpaceTransform(testJointIndex).mRotation;
|
||||
const AZ::Quaternion testJointNewRotation = jackPose->GetModelSpaceTransform(testJointIndex).m_rotation;
|
||||
|
||||
if (weight)
|
||||
{
|
||||
@@ -315,20 +315,20 @@ namespace EMotionFX
|
||||
|
||||
TEST_P(BlendTreeTwoLinkIKNodeFixture, BendDirectionOutputCorrectPose)
|
||||
{
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->mPortID,
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->m_portId,
|
||||
BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
m_paramNode->FindOutputPortByName("BendDirParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_BENDDIR);
|
||||
m_paramNode->FindOutputPortByName("BendDirParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_BENDDIR);
|
||||
m_twoLinkIKNode->SetRelativeBendDir(true);
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
|
||||
// Set up Jack's arm to specific position for testing
|
||||
const float weight = testing::get<0>(GetParam());
|
||||
const float x = m_param.bendDirPosition[0];
|
||||
const float y = m_param.bendDirPosition[1];
|
||||
const float z = m_param.bendDirPosition[2];
|
||||
const float x = m_param.m_bendDirPosition[0];
|
||||
const float y = m_param.m_bendDirPosition[1];
|
||||
const float z = m_param.m_bendDirPosition[2];
|
||||
ParamSetValue<MCore::AttributeFloat, float>("WeightParam", weight);
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("GoalPosParam", AZ::Vector3(x, y, z));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
@@ -336,28 +336,28 @@ namespace EMotionFX
|
||||
Pose* jackPose = m_actorInstance->GetTransformData()->GetCurrentPose();
|
||||
size_t testBendJointIndex;
|
||||
size_t testJointIndex;
|
||||
AZStd::string& bendLoArm = m_param.linkedJointNames[0];
|
||||
AZStd::string& bendLoArm = m_param.m_linkedJointNames[0];
|
||||
m_jackSkeleton->FindNodeAndIndexByName(bendLoArm, testBendJointIndex);
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.testJointName, testJointIndex);
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.m_testJointName, testJointIndex);
|
||||
|
||||
const AZ::Vector3 testJointBendPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
// Bend the test joint to opposite positions and check positions are opposite
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("BendDirParam", AZ::Vector3(1.0f, 0.0f, 0.0f));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3 testJointBendRightPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendRightPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("BendDirParam", AZ::Vector3(-1.0f, 0.0f, 0.0f));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3 testJointBendLeftPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendLeftPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("BendDirParam", AZ::Vector3(0.0f, 1.0f, 0.0f));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3 testJointBendDownPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendDownPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("BendDirParam", AZ::Vector3(0.0f, -1.0f, 0.0f));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3 testJointBendUpPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendUpPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
if (weight)
|
||||
{
|
||||
@@ -382,14 +382,14 @@ namespace EMotionFX
|
||||
TEST_P(BlendTreeTwoLinkIKNodeFixture, CombinedFunctionsOutputCorrectPose)
|
||||
{
|
||||
// Two Link IK Node should not break when using all of its functions at the same time
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->mPortID,
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, m_paramNode->FindOutputPortByName("WeightParam")->m_portId,
|
||||
BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
m_paramNode->FindOutputPortByName("RotationParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_GOALROT);
|
||||
m_paramNode->FindOutputPortByName("RotationParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_GOALROT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
m_paramNode->FindOutputPortByName("BendDirParam")->mPortID, BlendTreeTwoLinkIKNode::INPUTPORT_BENDDIR);
|
||||
m_paramNode->FindOutputPortByName("BendDirParam")->m_portId, BlendTreeTwoLinkIKNode::INPUTPORT_BENDDIR);
|
||||
m_twoLinkIKNode->SetRotationEnabled(true);
|
||||
m_twoLinkIKNode->SetRelativeBendDir(true);
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
@@ -397,48 +397,48 @@ namespace EMotionFX
|
||||
const Pose* jackPose = m_actorInstance->GetTransformData()->GetCurrentPose();
|
||||
size_t testJointIndex;
|
||||
size_t testBendJointIndex;
|
||||
AZStd::string& bendLoArm = m_param.linkedJointNames[0];
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.testJointName, testJointIndex);
|
||||
AZStd::string& bendLoArm = m_param.m_linkedJointNames[0];
|
||||
m_jackSkeleton->FindNodeAndIndexByName(m_param.m_testJointName, testJointIndex);
|
||||
m_jackSkeleton->FindNodeAndIndexByName(bendLoArm, testBendJointIndex);
|
||||
|
||||
// Adding weight and goal position
|
||||
const float weight = testing::get<0>(GetParam());
|
||||
const float posX = m_param.bendDirPosition[0];
|
||||
const float posY = m_param.bendDirPosition[1];
|
||||
const float posZ = m_param.bendDirPosition[2];
|
||||
const float posX = m_param.m_bendDirPosition[0];
|
||||
const float posY = m_param.m_bendDirPosition[1];
|
||||
const float posZ = m_param.m_bendDirPosition[2];
|
||||
ParamSetValue<MCore::AttributeFloat, float>("WeightParam", weight);
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("GoalPosParam", AZ::Vector3(posX, posY, posZ));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
|
||||
// Add bend direction
|
||||
const AZ::Vector3 testJointBendPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("BendDirParam", AZ::Vector3(1.0f, 0.0f, 0.0f));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3 testJointBendRightPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendRightPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("BendDirParam", AZ::Vector3(-1.0f, 0.0f, 0.0f));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3 testJointBendLeftPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendLeftPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("BendDirParam", AZ::Vector3(0.0f, 1.0f, 0.0f));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3 testJointBendDownPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendDownPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
ParamSetValue<MCore::AttributeVector3, AZ::Vector3>("BendDirParam", AZ::Vector3(0.0f, -1.0f, 0.0f));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Vector3 testJointBendUpPos = jackPose->GetModelSpaceTransform(testBendJointIndex).mPosition;
|
||||
const AZ::Vector3 testJointBendUpPos = jackPose->GetModelSpaceTransform(testBendJointIndex).m_position;
|
||||
|
||||
// Rotations with bent joint
|
||||
const AZ::Quaternion testJointOriginalRotation = jackPose->GetModelSpaceTransform(testJointIndex).mRotation;
|
||||
for (std::vector<float> rotateXYZ : m_param.rotations)
|
||||
const AZ::Quaternion testJointOriginalRotation = jackPose->GetModelSpaceTransform(testJointIndex).m_rotation;
|
||||
for (std::vector<float> rotateXYZ : m_param.m_rotations)
|
||||
{
|
||||
const float rotateX = rotateXYZ[0];
|
||||
const float rotateY = rotateXYZ[1];
|
||||
const float rotateZ = rotateXYZ[2];
|
||||
ParamSetValue<MCore::AttributeQuaternion, AZ::Quaternion>("RotationParam", AZ::Quaternion(rotateX, rotateY, rotateZ, 1.0f));
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const AZ::Quaternion testJointNewRotation = jackPose->GetModelSpaceTransform(testJointIndex).mRotation;
|
||||
const AZ::Quaternion testJointNewRotation = jackPose->GetModelSpaceTransform(testJointIndex).m_rotation;
|
||||
|
||||
if (weight)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user