From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Animation/KeyframeReducer.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Runtime/Animation/KeyframeReducer.h (limited to 'Runtime/Animation/KeyframeReducer.h') diff --git a/Runtime/Animation/KeyframeReducer.h b/Runtime/Animation/KeyframeReducer.h new file mode 100644 index 0000000..5fb6949 --- /dev/null +++ b/Runtime/Animation/KeyframeReducer.h @@ -0,0 +1,10 @@ +#pragma once + +class AnimationClip; +#include "Runtime/Math/AnimationCurve.h" + +// Rotation error is defined as maximum angle deviation allowed in degrees +// For others it is defined as maximum distance/delta deviation allowed in percents +void ReduceKeyframes (AnimationClip& clip, float rotationError, float positionError, float scaleError, float floatError); + +void EulerToQuaternionCurveBake (const AnimationCurve& curveX, const AnimationCurve& curveY, const AnimationCurve& curveZ, AnimationCurveQuat& collapsed, float sampleRate); -- cgit v1.1-26-g67d0