From 29b553ba0ac1a681589090195429b58841c87b56 Mon Sep 17 00:00:00 2001 From: Xiao Qi Date: Thu, 2 Mar 2023 15:15:03 +0800 Subject: [PATCH] Removed unnecessary params in FetchChannelKeyFrame function --- src/Libraries/MeshCompiler.h | 2 +- src/Libraries/MeshCompiler.hpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Libraries/MeshCompiler.h b/src/Libraries/MeshCompiler.h index c00b87a..b873e80 100644 --- a/src/Libraries/MeshCompiler.h +++ b/src/Libraries/MeshCompiler.h @@ -56,7 +56,7 @@ namespace SH_COMP static void FetchData(int accessorID, std::vector& dst); template - static void FetchChannelKeyFrame(int targetNode, int inputAcc, int outputAcc, int nodeTarget, std::vector& dst); + static void FetchChannelKeyFrame(int inputAcc, int outputAcc, std::vector& dst); public: static inline void LoadAndCompile(AssetPath path) noexcept; }; diff --git a/src/Libraries/MeshCompiler.hpp b/src/Libraries/MeshCompiler.hpp index ca2cfa7..4e84949 100644 --- a/src/Libraries/MeshCompiler.hpp +++ b/src/Libraries/MeshCompiler.hpp @@ -176,7 +176,7 @@ namespace SH_COMP } template - void MeshCompiler::FetchChannelKeyFrame(int targetNode, int inputAcc, int outputAcc, int nodeTarget, std::vector& dst) + void MeshCompiler::FetchChannelKeyFrame(int inputAcc, int outputAcc, std::vector& dst) { // ONLY ALLOW THIS FUNCTION TO BE USED ON KEY DATA STRUCT static_assert(std::derived_from == true); @@ -194,7 +194,7 @@ namespace SH_COMP dst.begin(), [](float const& time, SHVec4 const& value)->T { - return { time, {value.x, value.y, value.z} }; + return { time, value }; } ); } @@ -259,11 +259,11 @@ namespace SH_COMP anim.nodes.resize(channel.target_node + 1); if (channel.target_path == TRANSLATION_PATH.data()) - FetchChannelKeyFrame(channel.target_node, sampler.input, sampler.output, channel.target_node, anim.nodes[channel.target_node].positionKeys); + FetchChannelKeyFrame(sampler.input, sampler.output, anim.nodes[channel.target_node].positionKeys); else if (channel.target_path == SCALE_PATH.data()) - FetchChannelKeyFrame(channel.target_node, sampler.input, sampler.output, channel.target_node, anim.nodes[channel.target_node].scaleKeys); + FetchChannelKeyFrame(sampler.input, sampler.output, anim.nodes[channel.target_node].scaleKeys); else if (channel.target_path == ROTATION_PATH.data()) - FetchChannelKeyFrame(channel.target_node, sampler.input, sampler.output, channel.target_node, anim.nodes[channel.target_node].rotationKeys); + FetchChannelKeyFrame(sampler.input, sampler.output, anim.nodes[channel.target_node].rotationKeys); anim.nodes[channel.target_node].interpolation = sampler.interpolation == LINEAR_INTERPOLATION.data() ? AnimationInterpolation::LINEAR :