/*
 * 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/ICloseable.hpp"

namespace OpenVulkano
{
	namespace Scene
	{
		class Camera;
	}

	class CameraController : public ITickable, ICloseable
	{
		Scene::Camera* m_camera;

	protected:
		CameraController(Scene::Camera* camera = nullptr)
			: m_camera(camera)
		{}

	public:
		~CameraController() override = default;

		virtual void Init(Scene::Camera* camera) { m_camera = camera; }

		void Close() override { m_camera = nullptr; }

		void SetCamera(Scene::Camera* camera) { m_camera = camera; }

		Scene::Camera* GetCamera() { return m_camera; }

		virtual void SetActive() {}
	};
}
