-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0398503
commit 47ce6b1
Showing
3 changed files
with
126 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include <gim/ecs/engine/component_array.hpp> | ||
#include <glm/vec3.hpp> | ||
|
||
namespace gim::ecs::components::Camera { | ||
enum Mode : uint32_t { | ||
FirstPerson = 0, | ||
RTS = 1, | ||
}; | ||
|
||
class Component : public gim::ecs::IComponent { | ||
public: | ||
Mode mode = Mode::FirstPerson; | ||
glm::vec3 position = glm::vec3(0.0f, 0.0f, -0.0f); | ||
glm::vec3 front = glm::vec3(0.0f, 0.0f, -1.0f); | ||
glm::vec3 up = glm::vec3(0.0f, 1.0f, 0.0f); | ||
float speed = 0.05f; | ||
float yaw = -90.0f; | ||
float pitch = 0.0f; | ||
float sensitivity = 0.1f; | ||
|
||
Component() = default; | ||
~Component() override = default; | ||
}; | ||
} // namespace gim::ecs::components::Camera |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters