/* -----------------------------------------------------------------------------
	GSFramework
	Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */


#ifndef	__SCENE_DEBUG__
#define	__SCENE_DEBUG__


		#include "memory/nshared_ptr.h"
		#include "core/geometry.h"


namespace GS {
	namespace Render { class Renderer; }
	namespace S3D {
		class MItem;
		class Scene;

		using Render::Renderer;

/*!
	@short	Scene debugger interface.
	@author	Emmanuel Julien (ejulien@nworks.fr)
*/
class	SceneDebugger
{
protected:

		Scene		*scene;
		Core::sGeometry	pointlight, spotlight, linearlight, camera, object, trigger;

		/// Draw item bounding volume.
		void		DrawItemBoundingVolume(Renderer &, MItem *, uint display_flags = ~0);
		/// Draw figure.
		void		DrawFigure(Renderer &, Core::Geometry *, const Matrix4 &, Color &);
		/// Display managed item informations.
		void		DrawItem(Renderer &, MItem *, uint display_flags = ~0, Color * = 0);
		/// Display item identifier.
		void		DrawItemName(Renderer &, MItem *);

public:

		float		scale;

		/// Display scene items schematics.
		void		DrawScene(Renderer &, const List <MItem *> * = 0, const List <MItem *> *blacklist = 0, uint display_flags = ~0);

		/// Load schematic figures.
		bool		LoadSchematicFigures(const char *pointlight, const char *spotlight, const char *linearlight, const char *camera, const char *object, const char *trigger);
		/// Set scene.
		void		SetScene(Scene *);

		SceneDebugger();
};

	} // S3D
} // GS


#endif	// __SCENE_DEBUG__
