From a2019d03b227ecd2963e60b738807e2c87127c61 Mon Sep 17 00:00:00 2001 From: Guillaume Blanc Date: Sun, 31 Mar 2024 23:05:34 +0200 Subject: [PATCH] Simplifies math code. --- src/animation/offline/fbx/fbx_animation.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/animation/offline/fbx/fbx_animation.cc b/src/animation/offline/fbx/fbx_animation.cc index cb16f93a3..a19686279 100644 --- a/src/animation/offline/fbx/fbx_animation.cc +++ b/src/animation/offline/fbx/fbx_animation.cc @@ -158,13 +158,10 @@ bool ExtractAnimation(FbxSceneLoader& _scene_loader, const SamplingInfo& _info, const math::Transform& rest_pose = ozz::animation::GetJointLocalRestPose(_skeleton, i); - const math::SimdFloat4 t = - math::simd_float4::Load3PtrU(&rest_pose.translation.x); - const math::SimdFloat4 q = - math::simd_float4::LoadPtrU(&rest_pose.rotation.x); - const math::SimdFloat4 s = - math::simd_float4::Load3PtrU(&rest_pose.scale.x); - const math::Float4x4 local_matrix = math::Float4x4::FromAffine(t, q, s); + const math::Float4x4 local_matrix = math::Float4x4::FromAffine( + ozz::math::simd_float4::Load3PtrU(&rest_pose.translation.x), + ozz::math::simd_float4::LoadPtrU(&rest_pose.rotation.x), + ozz::math::simd_float4::Load3PtrU(&rest_pose.scale.x)); ozz::vector& node_matrices = world_matrices[i]; const int16_t parent = _skeleton.joint_parents()[i];