Nebula
Loading...
Searching...
No Matches
animevent.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
14#include "util/stringatom.h"
15#include "timing/time.h"
16
17//------------------------------------------------------------------------------
18namespace CoreAnimation
19{
21{
22public:
24 AnimEvent();
29
31 friend bool operator==(const AnimEvent& a, const AnimEvent& b);
33 friend bool operator!=(const AnimEvent& a, const AnimEvent& b);
35 friend bool operator<(const AnimEvent& a, const AnimEvent& b);
37 friend bool operator>(const AnimEvent& a, const AnimEvent& b);
39 friend bool operator<=(const AnimEvent& a, const AnimEvent& b);
41 friend bool operator>=(const AnimEvent& a, const AnimEvent& b);
42
45};
46
47//------------------------------------------------------------------------------
50inline
52 name(nullptr),
53 category(nullptr),
54 time(0)
55{
56 // empty
57}
58
59//------------------------------------------------------------------------------
62inline
64 name(n),
65 time(t)
66{
67 // empty
68}
69
70//------------------------------------------------------------------------------
73inline
75 name(n),
76 category(c),
77 time(t)
78{
79 // empty
80}
81
82//------------------------------------------------------------------------------
85inline bool
86operator==(const AnimEvent& a, const AnimEvent& b)
87{
88 return (a.time == b.time);
89}
90
91//------------------------------------------------------------------------------
94inline bool
95operator!=(const AnimEvent& a, const AnimEvent& b)
96{
97 return (a.time != b.time);
98}
99
100//------------------------------------------------------------------------------
103inline bool
104operator<(const AnimEvent& a, const AnimEvent& b)
105{
106 return (a.time < b.time);
107}
108
109//------------------------------------------------------------------------------
112inline bool
113operator>(const AnimEvent& a, const AnimEvent& b)
114{
115 return (a.time > b.time);
116}
117
118//------------------------------------------------------------------------------
121inline bool
122operator<=(const AnimEvent& a, const AnimEvent& b)
123{
124 return (a.time <= b.time);
125}
126
127//------------------------------------------------------------------------------
130inline bool
131operator>=(const AnimEvent& a, const AnimEvent& b)
132{
133 return (a.time >= b.time);
134}
135
136} // namespace CoreAnimation
137//------------------------------------------------------------------------------
An animation event associates a name with a point in time.
Definition animevent.h:21
friend bool operator!=(const AnimEvent &a, const AnimEvent &b)
inequality operator (time only)
Definition animevent.h:95
friend bool operator==(const AnimEvent &a, const AnimEvent &b)
equality operator (time only)
Definition animevent.h:86
friend bool operator<=(const AnimEvent &a, const AnimEvent &b)
less-or-equal operator (time only)
Definition animevent.h:122
Timing::Tick time
Definition animevent.h:44
friend bool operator>=(const AnimEvent &a, const AnimEvent &b)
greather-or-equal operator (time only)
Definition animevent.h:131
friend bool operator>(const AnimEvent &a, const AnimEvent &b)
greather-then operator (time only)
Definition animevent.h:113
Util::StringAtom category
Definition animevent.h:43
Util::StringAtom name
Definition animevent.h:43
AnimEvent()
constructor
Definition animevent.h:51
friend bool operator<(const AnimEvent &a, const AnimEvent &b)
less-then operator (time only)
Definition animevent.h:104
A StringAtom.
Definition stringatom.h:22
An animation resource holds a set of animations from a loaded NAX file.
Definition charactercontext.h:40
int Tick
the tick datatype (one tick == 1 millisecond)
Definition time.h:20
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.