diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/mecanim/animation/damp.h |
Diffstat (limited to 'Runtime/mecanim/animation/damp.h')
-rw-r--r-- | Runtime/mecanim/animation/damp.h | 42 |
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 + +} |