summaryrefslogtreecommitdiff
path: root/Runtime/Animation/Motion.h
blob: bffc91ebba9c4524697a85dccde08503d29dabf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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; 
};