Updated ozz-animation to version 0.14.3 (commit 92c392b667844)
This commit is contained in:
@@ -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;
|
||||
@@ -428,43 +426,24 @@ TEST(Twist, IKAimJob) {
|
||||
EXPECT_SIMDQUATERNION_EQ_TOL(quat, 0.f, 0.f, 0.f, 1.f, 2e-3f);
|
||||
}
|
||||
|
||||
{ // Pole y, twist pi
|
||||
{ // Pole y, twist pi / 2
|
||||
job.pole_vector = ozz::math::simd_float4::y_axis();
|
||||
job.twist_angle = ozz::math::kPi;
|
||||
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);
|
||||
ozz::math::Float3::x_axis(), ozz::math::kPi_2);
|
||||
EXPECT_SIMDQUATERNION_EQ_TOL(quat, x_Pi.x, x_Pi.y, x_Pi.z, x_Pi.w, 2e-3f);
|
||||
}
|
||||
|
||||
{ // Pole y, twist -pi
|
||||
{ // Pole y, twist -pi / 2
|
||||
job.pole_vector = ozz::math::simd_float4::y_axis();
|
||||
job.twist_angle = -ozz::math::kPi;
|
||||
job.twist_angle = -ozz::math::kPi_2;
|
||||
EXPECT_TRUE(job.Run());
|
||||
const ozz::math::Quaternion x_mPi = ozz::math::Quaternion::FromAxisAngle(
|
||||
ozz::math::Float3::x_axis(), -ozz::math::kPi);
|
||||
ozz::math::Float3::x_axis(), -ozz::math::kPi_2);
|
||||
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) {
|
||||
|
||||
@@ -3,6 +3,8 @@ target_include_directories(test_intrusive_list
|
||||
PUBLIC "${PROJECT_SOURCE_DIR}/include")
|
||||
target_link_libraries(test_intrusive_list
|
||||
gtest)
|
||||
target_compile_options(test_intrusive_list
|
||||
PRIVATE $<$<BOOL:${W_UNUSED_RESULT}>:-Wno-unused-result>)
|
||||
target_copy_shared_libraries(test_intrusive_list)
|
||||
add_test(NAME test_intrusive_list COMMAND test_intrusive_list)
|
||||
set_target_properties(test_intrusive_list PROPERTIES FOLDER "ozz/tests/base")
|
||||
@@ -11,6 +13,8 @@ add_executable(test_std_containers std_containers_tests.cc)
|
||||
target_link_libraries(test_std_containers
|
||||
ozz_base
|
||||
gtest)
|
||||
target_compile_options(test_std_containers
|
||||
PRIVATE $<$<BOOL:${W_UNUSED_RESULT}>:-Wno-unused-result>)
|
||||
target_copy_shared_libraries(test_std_containers)
|
||||
add_test(NAME test_std_containers COMMAND test_std_containers)
|
||||
set_target_properties(test_std_containers PROPERTIES FOLDER "ozz/tests/base")
|
||||
|
||||
Reference in New Issue
Block a user