Pioneer
AnimationKey.h
Go to the documentation of this file.
1 // Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2 // Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3 
4 #ifndef _SCENEGRAPH_ANIMATIONKEY_H
5 #define _SCENEGRAPH_ANIMATIONKEY_H
6 
7 #include "Quaternion.h"
8 #include "vector3.h"
9 
10 namespace SceneGraph {
11 
12  struct AnimationKey {
13  double time;
14 
15  AnimationKey(double t) :
16  time(t) {}
17  };
18 
19  struct PositionKey : public AnimationKey {
21 
22  PositionKey(double t, const vector3f &pos) :
23  AnimationKey(t),
24  position(pos) {}
25  };
26 
27  struct RotationKey : public AnimationKey {
29 
30  RotationKey(double t, const Quaternionf &q) :
31  AnimationKey(t),
32  rotation(q) {}
33  };
34 
35  struct ScaleKey : public AnimationKey {
37 
38  ScaleKey(double t, const vector3f &s) :
39  AnimationKey(t),
40  scale(s) {}
41  };
42 
43 } // namespace SceneGraph
44 
45 #endif
Definition: CityOnPlanet.h:31
Definition: AnimationKey.h:12
double time
Definition: AnimationKey.h:13
AnimationKey(double t)
Definition: AnimationKey.h:15
Definition: AnimationKey.h:19
PositionKey(double t, const vector3f &pos)
Definition: AnimationKey.h:22
vector3f position
Definition: AnimationKey.h:20
Definition: AnimationKey.h:27
RotationKey(double t, const Quaternionf &q)
Definition: AnimationKey.h:30
Quaternionf rotation
Definition: AnimationKey.h:28
Definition: AnimationKey.h:35
ScaleKey(double t, const vector3f &s)
Definition: AnimationKey.h:38
vector3f scale
Definition: AnimationKey.h:36