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/mecanim/animation/damp.h | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Runtime/mecanim/animation/damp.h (limited to 'Runtime/mecanim/animation/damp.h') 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 + +} -- cgit v1.1-26-g67d0