// Author: Juan Carlos De Abreu (jcabreur@gmail.com)
//
// This file define a class that manage the shadows in the scene.

#ifndef SHADOW_SHADOW_MANAGEMENT_H__
#define SHADOW_SHADOW_MANAGEMENT_H__

#include "vector"

#include "../global.h"
#include "../Base/Singleton.h"
#include "../Base/Memory/SmartPointer.h"
#include "Shadows.h"

BEGIN_TEG_NAMESPACE();

class ShadowManagement : public Singleton<ShadowManagement> {
 public:
  // ShadowManagement constructor and destructor.
  ShadowManagement();
  ~ShadowManagement();

  // Methods to initialize and release the type of shadows to be use in the scene.
  void init();
  void release();

  // Method to display the shadows for a specific source light and a set of geoemtries.
  void render(SmartPointer<LightNode> light, std::vector<SmartPointer<GeometryNode>>& models);

 private:
  // ShadowManagement attributes, instance for the type of shadow to be use.
  SmartPointer<Shadows> shadow_;
  DISALLOW_COPY_AND_ASSIGN(ShadowManagement);
};

END_TEG_NAMESPACE();

#endif  // SHADOW_SHADOW_MANAGEMENT_H__
