From 7b61a4f103b9008c96a141a97c12e6adf4bda874 Mon Sep 17 00:00:00 2001 From: Guillaume Blanc Date: Thu, 23 Nov 2023 22:17:32 +0100 Subject: [PATCH] Simplify ik aim test --- test/animation/runtime/ik_aim_job_tests.cc | 25 ++-------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/test/animation/runtime/ik_aim_job_tests.cc b/test/animation/runtime/ik_aim_job_tests.cc index 21bf35367..a4efa2d49 100644 --- a/test/animation/runtime/ik_aim_job_tests.cc +++ b/test/animation/runtime/ik_aim_job_tests.cc @@ -25,15 +25,13 @@ // // //----------------------------------------------------------------------------// +#include "gtest/gtest.h" #include "ozz/animation/runtime/ik_aim_job.h" - +#include "ozz/base/maths/gtest_math_helper.h" #include "ozz/base/maths/quaternion.h" #include "ozz/base/maths/simd_math.h" #include "ozz/base/maths/simd_quaternion.h" -#include "gtest/gtest.h" -#include "ozz/base/maths/gtest_math_helper.h" - TEST(JobValidity, IKAimJob) { const ozz::math::Float4x4 joint = ozz::math::Float4x4::identity(); ozz::math::SimdQuaternion quat; @@ -446,25 +444,6 @@ TEST(Twist, IKAimJob) { EXPECT_SIMDQUATERNION_EQ_TOL(quat, x_mPi.x, x_mPi.y, x_mPi.z, x_mPi.w, 2e-3f); } - - { // Pole y, twist pi/2 - job.pole_vector = ozz::math::simd_float4::y_axis(); - job.twist_angle = ozz::math::kPi_2; - EXPECT_TRUE(job.Run()); - const ozz::math::Quaternion x_Pi_2 = ozz::math::Quaternion::FromAxisAngle( - ozz::math::Float3::x_axis(), ozz::math::kPi_2); - EXPECT_SIMDQUATERNION_EQ_TOL(quat, x_Pi_2.x, x_Pi_2.y, x_Pi_2.z, x_Pi_2.w, - 2e-3f); - } - - { // Pole z, twist pi/2 - job.pole_vector = ozz::math::simd_float4::z_axis(); - job.twist_angle = ozz::math::kPi_2; - EXPECT_TRUE(job.Run()); - const ozz::math::Quaternion x_Pi = ozz::math::Quaternion::FromAxisAngle( - ozz::math::Float3::x_axis(), ozz::math::kPi); - EXPECT_SIMDQUATERNION_EQ_TOL(quat, x_Pi.x, x_Pi.y, x_Pi.z, x_Pi.w, 2e-3f); - } } TEST(AlignedTargetUp, IKAimJob) {