46 lines
926 B
C++
46 lines
926 B
C++
/*
|
|
* 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;
|
|
Input::InputAction* m_actionZoom;
|
|
|
|
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 SetSliceHeight(float height);
|
|
|
|
void Tick() override;
|
|
|
|
void SetDefaultKeybindings();
|
|
};
|
|
}
|