text: #pragma once
  
  #include "Rendering/FrameBuffer.h"
  #include "Rendering/Graphics.h"
  #include "Rendering/Shader.h"
  #include "Core/Engine.h"
  
  namespace Volund
  {
  	/// <summary>
  	/// A camera, specifies the perspective that the world will be rendered from, Constructor: (uint32_t Size_X = Window.Size_X, uint32_t Size_Y = Window.Size_Y).
  	/// </summary>
  	class Camera : public Component
  	{
  	public:
  
  		/// <summary>
  		/// Renders the current scene to the specified buffer.
  		/// </summary>
  		void Render(GPUBuffer& Buffer);
  
  		/// <summary>
  		/// Returns if the camera is currently the ActiveCamera.
  		/// </summary>
  		bool IsActive() const;
  
  		/// <summary>
  		/// Sets the camera to be the ActiveCamera.
  		/// </summary>
  		void SetActive();
  
  		/// <summary>
  		/// Sends the camera to the specifed shader, shader needs to have lights definined in same way as in the "Template.shader".
  		/// </summary>
  		void SendToShader(Shader& shader) const;
  
  		/// <summary>
  		/// Compute and return the Frustum of the camera.
  		/// </summary>
  		void GetFrustum(Vec4(&FrustumPlanes)[6]) const;
  
  		/// <summary>
  		/// The horizontal field of view.
  		/// </summary>
  		float Fov = 90.0f;
  
  		/// <summary>
  		/// The distance to the closest rendered point.
  		/// </summary>
  		float NearPlane = 0.01f;
  
  		/// <summary>
  		/// The distance to the furthest rendered point.
  		/// </summary>
  		float FarPlane = 1000.0f;
  
  		/// <summary>
  		/// The buffer that the camera draws to (Read only).
  		/// </summary>
  		FrameBuffer const& Buffer = Buffer_P;
  
  		/// <summary>
  		/// The view matrix of the camera (Read only).
  		/// </summary>
  		Mat4 const& ViewMatrix = ViewMatrix_P;
  
  		/// <summary>
  		/// The view matrix of the camera without translation (Read only).
  		/// </summary>
  		Mat4 const& OriginViewMatrix = OriginViewMatrix_P;
  
  		/// <summary>
  		/// The projection matrix of the camera (Read only).
  		/// </summary>
  		Mat4 const& ProjectionMatrix = ProjectionMatrix_P;
  
  		void Update() override;
  
  		Camera(IVec2 BufferSize = Window::GetSize());
  
  	private:
  
  		FrameBuffer Buffer_P;
  
  		Mat4 ViewMatrix_P = Mat4(1.0f);
  
  		Mat4 OriginViewMatrix_P = Mat4(1.0f);
  
  		Mat4 ProjectionMatrix_P = Mat4(1.0f);
  	};
  
  } //namespace Volund