Add basic map camera controller

This commit is contained in:
Georg Hagen
2024-07-01 14:01:59 +02:00
parent beeea386aa
commit f9467f322f
2 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "CameraController.hpp"
#include "Math/Math.hpp"
namespace OpenVulkano
{
namespace Input
{
class InputAction;
}
class MapCameraController final : public CameraController
{
Input::InputAction* m_actionSide;
Input::InputAction* m_actionUp;
Math::Vector3f_SIMD m_dirUp;
Math::Vector3f_SIMD m_dirSide;
public:
MapCameraController(Scene::Camera* camera = nullptr);
~MapCameraController() override = default;
void SetDir(const Math::Vector3f_SIMD& up, const Math::Vector3f_SIMD& side)
{
m_dirUp = up;
m_dirSide = side;
}
void Tick() override;
void SetDefaultKeybindings();
};
}