Move some controllers
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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 "Base/ITickable.hpp"
|
||||
#include "Base/Event.hpp"
|
||||
#include "Scene/Ray.hpp"
|
||||
#include "Input/InputAction.hpp"
|
||||
#include "Scene/Camera.hpp"
|
||||
|
||||
namespace OpenVulkano::Scene
|
||||
{
|
||||
class SceneIntersectionTestController : public ITickable
|
||||
{
|
||||
public:
|
||||
SceneIntersectionTestController() = default;
|
||||
SceneIntersectionTestController(Camera* camera) : m_camera(camera) {}
|
||||
void SetCamera(Camera* camera) { m_camera = camera; }
|
||||
[[nodiscard]] Camera* GetCamera() const { return m_camera; }
|
||||
void Tick() override;
|
||||
void SetDefaultKeybindings();
|
||||
Event<DrawableRayHit> OnHit;
|
||||
|
||||
private:
|
||||
Input::InputAction* m_actionClick = nullptr;
|
||||
Input::InputAction* m_actionClickX = nullptr;
|
||||
Input::InputAction* m_actionClickY = nullptr;
|
||||
Camera* m_camera;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user