VEX Engine
Retro looking game engine made in vulkan mostly because i wanted to understand it better.
Loading...
Searching...
No Matches
UtilityComponents.hpp
1#pragma once
2
5#include <glm/glm.hpp>
6#include <glm/gtc/constants.hpp>
7
8namespace vex {
9
12 float lifespan = 5.0f;
13 float timeElapsed = 0.0f;
14};
15
18 glm::vec3 axis = {0.0f, 1.0f, 0.0f};
19 float amplitude = 1.0f;
20 float frequency = 1.0f;
21 float timeOffset = 0.0f;
22
23 // Internal state
24 float currentTime = 0.0f;
25 glm::vec3 startPosition = {0.0f, 0.0f, 0.0f};
26 bool initialized = false;
27};
28
31 glm::vec3 targetLocalOffset = {0.0f, 5.0f, 0.0f};
32 float duration = 2.0f;
33 bool pingPong = true;
34
35 // Internal state
36 float timeElapsed = 0.0f;
37 glm::vec3 startPosition = {0.0f, 0.0f, 0.0f};
38 bool initialized = false;
39 bool returning = false;
40};
41
42} // namespace vex
Contains basic components like transform, camera, name components..
Contains ComponentRegistry class used to have register of posible to create components....
Destroys the entity after a set amount of time. Useful for temporary effects.
Moves an entity back and forth using a sine wave without physics overhead.
Smoothly interpolates an entity's local position over time.