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/Motion.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Runtime/Animation/Motion.h (limited to 'Runtime/Animation/Motion.h') diff --git a/Runtime/Animation/Motion.h b/Runtime/Animation/Motion.h new file mode 100644 index 0000000..bffc91e --- /dev/null +++ b/Runtime/Animation/Motion.h @@ -0,0 +1,42 @@ +#pragma once + +#include "Runtime/BaseClasses/NamedObject.h" +#include "Runtime/Misc/UserList.h" +#include "Runtime/Math/Vector3.h" + +class MessageIdentifier; +class AnimationClip; + +class Motion : public NamedObject +{ +public: + REGISTER_DERIVED_ABSTRACT_CLASS (Motion, NamedObject) + + Motion (MemLabelId label, ObjectCreationMode mode); + + void NotifyObjectUsers(const MessageIdentifier& msg); + void AddObjectUser( UserList& user ); + +#if UNITY_EDITOR + virtual float GetAverageDuration() = 0; + virtual float GetAverageAngularSpeed() = 0; + virtual Vector3f GetAverageSpeed() = 0; + virtual float GetApparentSpeed() = 0; + + virtual bool ValidateIfRetargetable(bool showWarning = true) = 0; + + virtual bool IsLooping() = 0 ; + + virtual bool IsAnimatorMotion()const = 0; + virtual bool IsHumanMotion() = 0; + +#endif + + virtual void AddUser(UserList& dependencies) { dependencies.AddUser(GetUserList ());} + + UserList& GetUserList () { return m_ObjectUsers; } + +private: + + UserList m_ObjectUsers; +}; -- cgit v1.1-26-g67d0