rework API

This commit is contained in:
ohyzha
2024-11-06 09:48:53 +02:00
parent e2df88ca22
commit 3521ddeb1d
21 changed files with 296 additions and 230 deletions

View File

@@ -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 "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;
};
}