Nebula
Loading...
Searching...
No Matches
animeventinfo.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
13#include "timing/time.h"
14#include "util/stringatom.h"
16
17//------------------------------------------------------------------------------
18namespace Animation
19{
21{
22public:
25
27 friend bool operator==(const AnimEventInfo& a, const AnimEventInfo& b);
29 friend bool operator!=(const AnimEventInfo& a, const AnimEventInfo& b);
31 friend bool operator<(const AnimEventInfo& a, const AnimEventInfo& b);
33 friend bool operator>(const AnimEventInfo& a, const AnimEventInfo& b);
35 friend bool operator<=(const AnimEventInfo& a, const AnimEventInfo& b);
37 friend bool operator>=(const AnimEventInfo& a, const AnimEventInfo& b);
38
43
45 const Util::StringAtom& GetAnimJobName() const;
47 void SetAnimJobName(const Util::StringAtom& val);
48
50 float GetWeight() const;
52 void SetWeight(float val);
53
55 void SetEntityId(const Graphics::GraphicsEntity::Id& id);
57 const Graphics::GraphicsEntity::Id& GetEntityId() const;
58
59private:
62 float weight;
63 Graphics::GraphicsEntity::Id id;
64};
65
66//------------------------------------------------------------------------------
69inline
71 id(InvalidIndex)
72{
73 // empty
74}
75
76//------------------------------------------------------------------------------
79inline bool
81{
82 return (a.animEvent == b.animEvent);
83}
84
85//------------------------------------------------------------------------------
88inline bool
90{
91 return (a.animEvent != b.animEvent);
92}
93
94//------------------------------------------------------------------------------
97inline bool
98operator<(const AnimEventInfo& a, const AnimEventInfo& b)
99{
100 return (a.animEvent < b.animEvent);
101}
102
103//------------------------------------------------------------------------------
106inline bool
108{
109 return (a.animEvent > b.animEvent);
110}
111
112//------------------------------------------------------------------------------
115inline bool
116operator<=(const AnimEventInfo& a, const AnimEventInfo& b)
117{
118 return (a.animEvent <= b.animEvent);
119}
120
121//------------------------------------------------------------------------------
124inline bool
126{
127 return (a.animEvent >= b.animEvent);
128}
129
130//------------------------------------------------------------------------------
133inline const CoreAnimation::AnimEvent&
135{
136 return this->animEvent;
137}
138
139//------------------------------------------------------------------------------
142inline void
147
148//------------------------------------------------------------------------------
151inline const Util::StringAtom&
153{
154 return this->animJobName;
155}
156
157//------------------------------------------------------------------------------
160inline void
162{
163 this->animJobName = val;
164}
165
166//------------------------------------------------------------------------------
169inline float
171{
172 return this->weight;
173}
174
175//------------------------------------------------------------------------------
178inline void
180{
181 this->weight = val;
182}
183
184//------------------------------------------------------------------------------
187inline
188void
189AnimEventInfo::SetEntityId(const Graphics::GraphicsEntity::Id& id)
190{
191 this->id = id;
192}
193
194//------------------------------------------------------------------------------
197inline
198const Graphics::GraphicsEntity::Id&
200{
201 return this->id;
202}
203} // namespace Animation
204//------------------------------------------------------------------------------
The AnimEventInfo has extra information of the animevent, like the animjob from which it is initiated...
Definition animeventinfo.h:21
friend bool operator<(const AnimEventInfo &a, const AnimEventInfo &b)
less-then operator (time only)
Definition animeventinfo.h:98
void SetWeight(float val)
set Weight
Definition animeventinfo.h:179
void SetAnimJobName(const Util::StringAtom &val)
set ClipName
Definition animeventinfo.h:161
float GetWeight() const
get Weight
Definition animeventinfo.h:170
void SetEntityId(const Graphics::GraphicsEntity::Id &id)
set id
Definition animeventinfo.h:189
friend bool operator<=(const AnimEventInfo &a, const AnimEventInfo &b)
less-or-equal operator (time only)
Definition animeventinfo.h:116
Util::StringAtom animJobName
Definition animeventinfo.h:61
friend bool operator==(const AnimEventInfo &a, const AnimEventInfo &b)
equality operator (time only)
Definition animeventinfo.h:80
AnimEventInfo()
constructor
Definition animeventinfo.h:70
const Util::StringAtom & GetAnimJobName() const
get ClipName
Definition animeventinfo.h:152
const CoreAnimation::AnimEvent & GetAnimEvent() const
get AnimEvent
Definition animeventinfo.h:134
friend bool operator>(const AnimEventInfo &a, const AnimEventInfo &b)
greather-then operator (time only)
Definition animeventinfo.h:107
friend bool operator!=(const AnimEventInfo &a, const AnimEventInfo &b)
inequality operator (time only)
Definition animeventinfo.h:89
void SetAnimEvent(const CoreAnimation::AnimEvent &val)
set AnimEvent
Definition animeventinfo.h:143
float weight
Definition animeventinfo.h:62
Graphics::GraphicsEntity::Id id
Definition animeventinfo.h:63
friend bool operator>=(const AnimEventInfo &a, const AnimEventInfo &b)
greather-or-equal operator (time only)
Definition animeventinfo.h:125
const Graphics::GraphicsEntity::Id & GetEntityId() const
get id
Definition animeventinfo.h:199
CoreAnimation::AnimEvent animEvent
Definition animeventinfo.h:60
An animation event associates a name with a point in time.
Definition animevent.h:21
A StringAtom.
Definition stringatom.h:22
Definition animeventhandlerbase.cc:10
bool operator<(const String &a, const String &b)
Definition string.cc:877
bool operator==(const String &a, const String &b)
Definition string.cc:830
bool operator!=(const String &a, const String &b)
Definition string.cc:868
bool operator<=(const String &a, const String &b)
Definition string.cc:895
bool operator>=(const String &a, const String &b)
Definition string.cc:904
bool operator>(const String &a, const String &b)
Definition string.cc:886
Typedefs for the Timing subsystem.
static const int InvalidIndex
Definition types.h:54