Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/include/cinematic.h

48 lines
788 B
C
Raw Normal View History

2018-10-30 21:13:36 -04:00
#pragma once
#include <vector>
#include <glm/glm.hpp>
2018-12-19 12:19:52 -05:00
#include <json.hpp>
2018-10-30 21:13:36 -04:00
2018-12-19 12:19:52 -05:00
#include "ecs.h"
2018-10-30 21:13:36 -04:00
struct Keyframe {
int time = 0;
glm::vec3 valueVec3 = glm::vec3(0);
int valueInt = 0;
2018-10-30 21:13:36 -04:00
};
enum class AnimationProperty {
Position,
Target,
FoV
2018-10-30 21:13:36 -04:00
};
struct Animation {
2018-12-19 12:19:52 -05:00
EntityID target;
std::string targetName, targetComponent;
2018-10-30 21:13:36 -04:00
AnimationProperty property = AnimationProperty::Position;
std::vector<Keyframe> keyframes;
};
2018-12-19 12:19:52 -05:00
struct CinematicEntity {
nlohmann::json data;
};
2018-10-30 21:13:36 -04:00
struct Shot {
int start = 0, end = 0;
bool loaded = false;
2018-12-19 12:19:52 -05:00
std::string world;
2018-10-30 21:13:36 -04:00
2018-12-19 12:19:52 -05:00
std::vector<CinematicEntity> entities;
std::vector<EntityID> loadedEntities;
2018-10-30 21:13:36 -04:00
std::vector<Animation*> animations;
};
class Cinematic {
public:
std::vector<Shot*> shots;
};