VEX Engine
Retro looking game engine made in vulkan mostly because i wanted to understand it better.
Loading...
Searching...
No Matches
EditorCamera.hpp
Go to the documentation of this file.
1
6
7#pragma once
8#include "Engine.hpp"
12
14
17public:
24 EditorCameraObject(vex::Engine& engine, const std::string& name, SDL_Window* window);
25
31 void processEvent(const SDL_Event& event, float deltaTime);
32
35 void Update(float deltaTime) override;
36
39 void setViewportHovered(bool hovered) { m_viewportHovered = hovered; }
40private:
41 SDL_Window* m_window;
42 std::unordered_map<SDL_Scancode, bool> keyStates;
43
44 bool m_viewportHovered = false;
45 bool m_isFlying = false;
46 float m_mouseSensitivity = 0.1f;
47 float m_movementSpeed = 50.0f;
48};
Contains basic components like transform, camera, name components..
This file defines in engine CameraObject class.
Contains main Engine class.
This file defines the GameObject class.
EditorCameraObject(vex::Engine &engine, const std::string &name, SDL_Window *window)
Constructs an EditorCameraObject.
void setViewportHovered(bool hovered)
Sets whether the editor's viewport window is currently being hovered by the mouse.
void processEvent(const SDL_Event &event, float deltaTime)
Processes SDL events specific to the editor camera (e.g., mouse movement, key presses).
void Update(float deltaTime) override
Overrides the base GameObject Update for continuous camera movement and logic.
Basic camera object class. it only contains transform and camera components.
Class for interaction with engine systems.
Definition Engine.hpp:47