summaryrefslogtreecommitdiff
path: root/Runtime/mecanim/animation/damp.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/mecanim/animation/damp.h')
-rw-r--r--Runtime/mecanim/animation/damp.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/Runtime/mecanim/animation/damp.h b/Runtime/mecanim/animation/damp.h
new file mode 100644
index 0000000..319f6e6
--- /dev/null
+++ b/Runtime/mecanim/animation/damp.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include "Runtime/mecanim/defs.h"
+#include "Runtime/mecanim/memory.h"
+#include "Runtime/mecanim/types.h"
+#include "Runtime/Math/Simd/float4.h"
+
+namespace mecanim
+{
+
+namespace dynamics
+{
+ class ScalDamp
+ {
+ public:
+
+ float m_DampTime;
+ float m_Value;
+
+ ScalDamp() { Reset(); }
+
+ void Reset() { m_DampTime = 0; m_Value = 0; }
+ void Evaluate(float value, float deltaTime);
+ };
+
+
+ class VectorDamp
+ {
+ public:
+
+ float m_DampTime;
+ math::float4 m_Value;
+
+ VectorDamp() { Reset(); }
+
+ void Reset() { m_DampTime = 0; m_Value = math::float4::zero(); }
+ void Evaluate(math::float4 const& value, float deltaTime);
+ };
+
+} // namespace dynamics
+
+}