Nebula
Toggle main menu visibility
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
//------------------------------------------------------------------------------
18
namespace
CoreAnimation
19
{
20
class
AnimEvent
21
{
22
public
:
24
AnimEvent
();
26
AnimEvent
(
const
Util::StringAtom
&
name
,
Timing::Tick
time
);
28
AnimEvent
(
const
Util::StringAtom
&
name
,
const
Util::StringAtom
&
category
,
Timing::Tick
time
);
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
43
Util::StringAtom
name
,
category
;
44
Timing::Tick
time
;
45
};
46
47
//------------------------------------------------------------------------------
50
inline
51
AnimEvent::AnimEvent
() :
52
name
(nullptr),
53
category
(nullptr),
54
time
(0)
55
{
56
// empty
57
}
58
59
//------------------------------------------------------------------------------
62
inline
63
AnimEvent::AnimEvent
(
const
Util::StringAtom
& n,
Timing::Tick
t) :
64
name
(n),
65
time
(t)
66
{
67
// empty
68
}
69
70
//------------------------------------------------------------------------------
73
inline
74
AnimEvent::AnimEvent
(
const
Util::StringAtom
& n,
const
Util::StringAtom
& c,
Timing::Tick
t) :
75
name
(n),
76
category
(c),
77
time
(t)
78
{
79
// empty
80
}
81
82
//------------------------------------------------------------------------------
85
inline
bool
86
operator==
(
const
AnimEvent
& a,
const
AnimEvent
& b)
87
{
88
return
(a.
time
== b.
time
);
89
}
90
91
//------------------------------------------------------------------------------
94
inline
bool
95
operator!=
(
const
AnimEvent
& a,
const
AnimEvent
& b)
96
{
97
return
(a.
time
!= b.
time
);
98
}
99
100
//------------------------------------------------------------------------------
103
inline
bool
104
operator<
(
const
AnimEvent
& a,
const
AnimEvent
& b)
105
{
106
return
(a.
time
< b.
time
);
107
}
108
109
//------------------------------------------------------------------------------
112
inline
bool
113
operator>
(
const
AnimEvent
& a,
const
AnimEvent
& b)
114
{
115
return
(a.
time
> b.
time
);
116
}
117
118
//------------------------------------------------------------------------------
121
inline
bool
122
operator<=
(
const
AnimEvent
& a,
const
AnimEvent
& b)
123
{
124
return
(a.
time
<= b.
time
);
125
}
126
127
//------------------------------------------------------------------------------
130
inline
bool
131
operator>=
(
const
AnimEvent
& a,
const
AnimEvent
& b)
132
{
133
return
(a.
time
>= b.
time
);
134
}
135
136
}
// namespace CoreAnimation
137
//------------------------------------------------------------------------------
CoreAnimation::AnimEvent::operator!=
friend bool operator!=(const AnimEvent &a, const AnimEvent &b)
inequality operator (time only)
Definition
animevent.h:95
CoreAnimation::AnimEvent::operator==
friend bool operator==(const AnimEvent &a, const AnimEvent &b)
equality operator (time only)
Definition
animevent.h:86
CoreAnimation::AnimEvent::operator<=
friend bool operator<=(const AnimEvent &a, const AnimEvent &b)
less-or-equal operator (time only)
Definition
animevent.h:122
CoreAnimation::AnimEvent::time
Timing::Tick time
Definition
animevent.h:44
CoreAnimation::AnimEvent::operator>=
friend bool operator>=(const AnimEvent &a, const AnimEvent &b)
greather-or-equal operator (time only)
Definition
animevent.h:131
CoreAnimation::AnimEvent::operator>
friend bool operator>(const AnimEvent &a, const AnimEvent &b)
greather-then operator (time only)
Definition
animevent.h:113
CoreAnimation::AnimEvent::category
Util::StringAtom category
Definition
animevent.h:43
CoreAnimation::AnimEvent::name
Util::StringAtom name
Definition
animevent.h:43
CoreAnimation::AnimEvent::AnimEvent
AnimEvent()
constructor
Definition
animevent.h:51
CoreAnimation::AnimEvent::operator<
friend bool operator<(const AnimEvent &a, const AnimEvent &b)
less-then operator (time only)
Definition
animevent.h:104
Util::StringAtom
A StringAtom.
Definition
stringatom.h:22
CoreAnimation
An animation resource holds a set of animations from a loaded NAX file.
Definition
charactercontext.h:40
Timing::Tick
int Tick
the tick datatype (one tick == 1 millisecond)
Definition
time.h:20
stringatom.h
time.h
Typedefs for the Timing subsystem.
code
render
coreanimation
animevent.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.