text: #pragma once
  
  #include <gsl\gsl>
  #include <winrt\Windows.Foundation.h>
  #include <d3d11.h>
  #include "DrawableGameComponent.h"
  #include "MatrixHelper.h"
  #include "DirectionalLight.h"
  
  namespace Library
  {
  	class ProxyModel;
  }
  
  namespace Rendering
  {
  	class BlinnPhongMaterial;
  
  	class BlinnPhongDemo final : public Library::DrawableGameComponent
  	{
  	public:
  		BlinnPhongDemo(Library::Game& game, const std::shared_ptr<Library::Camera>& camera);
  		BlinnPhongDemo(const BlinnPhongDemo&) = delete;
  		BlinnPhongDemo(BlinnPhongDemo&&) = default;
  		BlinnPhongDemo& operator=(const BlinnPhongDemo&) = default;		
  		BlinnPhongDemo& operator=(BlinnPhongDemo&&) = default;
  		~BlinnPhongDemo();
  
  		bool AnimationEnabled() const;
  		void SetAnimationEnabled(bool enabled);
  		void ToggleAnimation();
  
  		float AmbientLightIntensity() const;
  		void SetAmbientLightIntensity(float intensity);
  
  		float DirectionalLightIntensity() const;
  		void SetDirectionalLightIntensity(float intensity);
  
  		const DirectX::XMFLOAT3& LightDirection() const;
  		void RotateDirectionalLight(const DirectX::XMFLOAT2& amount);
  
  		float SpecularIntensity() const;
  		void SetSpecularIntensity(float intensity);
  
  		float SpecularPower() const;
  		void SetSpecularPower(float power);
  
  		virtual void Initialize() override;
  		virtual void Update(const Library::GameTime& gameTime) override;
  		virtual void Draw(const Library::GameTime& gameTime) override;
  
  	private:
  		inline static const float RotationRate{ DirectX::XM_PI };
  
  		std::shared_ptr<BlinnPhongMaterial> mMaterial;
  		DirectX::XMFLOAT4X4 mWorldMatrix{ Library::MatrixHelper::Identity };
  		winrt::com_ptr<ID3D11Buffer> mVertexBuffer;
  		winrt::com_ptr<ID3D11Buffer> mIndexBuffer;
  		std::uint32_t mIndexCount{ 0 };
  		Library::DirectionalLight mDirectionalLight;
  		std::unique_ptr<Library::ProxyModel> mProxyModel;
  		float mModelRotationAngle{ 0.0f };
  		bool mAnimationEnabled{ true };
  		bool mUpdateMaterial{ true };
  	};
  }