Add basic map camera controller
This commit is contained in:
42
openVulkanoCpp/Controller/MapCameraController.hpp
Normal file
42
openVulkanoCpp/Controller/MapCameraController.hpp
Normal 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();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user