summaryrefslogtreecommitdiff
path: root/Runtime/Animation/KeyframeReducer.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Animation/KeyframeReducer.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Animation/KeyframeReducer.h')
-rw-r--r--Runtime/Animation/KeyframeReducer.h10
1 files changed, 10 insertions, 0 deletions
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);