Cogs.Core
CinematicCameraComponent.h
1#pragma once
2
3#include "Resources/Resources.h"
4
5#include "Foundation/ComponentModel/Component.h"
6
7#include <glm/gtc/quaternion.hpp>
8#include <glm/vec3.hpp>
9
10namespace Cogs
11{
12 namespace Core
13 {
14 /* Encoded type for easing functions. */
15 enum class CameraEasingMode : uint32_t
16 {
17 Linear,
18
19 QuadraticIn,
20 QuadraticOut,
21 QuadraticInOut,
22
23 CubicIn,
24 CubicOut,
25 CubicInOut,
26
27 QuarticIn,
28 QuarticOut,
29 QuarticInOut,
30
31 QuinticIn,
32 QuinticOut,
33 QuinticInOut,
34
35 SinusoidalIn,
36 SinusoidalOut,
37 SinusoidalInOut,
38
39 ExponentialIn,
40 ExponentialOut,
41 ExponentialInOut,
42
43 CircularIn,
44 CircularOut,
45 CircularInOut,
46
47 ElasticIn,
48 ElasticOut,
49 ElasticInOut,
50
51 BackIn,
52 BackOut,
53 BackInOut,
54
55 BounceIn,
56 BounceOut,
57 BounceInOut,
58
59 SIZE,
60 };
61
63 {
64 public:
66 static void registerType();
67
72
74 std::vector<glm::vec3> interestPointPosition;
75
77 std::vector<glm::quat> interestPointRotation;
78
80 std::vector<float> interestPointTimeToReach;
81
83 std::vector<float> interestPointWaitingTime;
84
86 std::vector<CameraEasingMode> interestPointEasingMode;
87
89 bool isCinematicPlaying = false;
90
92 bool loop = false;
93 };
94 }
95}
96
97template<> inline Cogs::StringView getName<Cogs::Core::CinematicCameraComponent>() { return "CinematicCameraComponent"; }
98template<> inline Cogs::StringView getName<Cogs::Core::CameraEasingMode>() { return "CameraEasingMode"; }
99template<> inline Cogs::StringView getName<std::vector<Cogs::Core::CameraEasingMode>>() { return "vector<CameraEasingMode>"; }
Base class for Component instances.
Definition: Component.h:143
std::vector< glm::quat > interestPointRotation
Rotation of the Camera.
bool isCinematicPlaying
Wether this sequence is listed to play or not.
std::vector< float > interestPointWaitingTime
Waiting Time before interpolating towards point[++i].
bool loop
Wether this sequence is marked to loop endlessly.
std::vector< CameraEasingMode > interestPointEasingMode
Easing Mode between points[–i] and points[i].
std::vector< glm::vec3 > interestPointPosition
It is assumed that the arrays are of equal length (ALWAYS), otherwise component will just bail out of...
static void registerType()
Register the type in the type system.
std::vector< float > interestPointTimeToReach
Interpolation time to reach point[i].
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23