/*
/ DIRECTOR.H
/ **********
/ Core scene director interface class.
/
/ Will Beddow 2010 - http://343gs.com/brainstem
/
/ This software is currently under development
/ and is subject to change and improvement. Some
/ aspects of the system are incomplete and/or 
/ unstable due to ongoing implementation.
/
*/

#ifndef __DIRECTOR_H__
#define __DIRECTOR_H__

#include "Compile.h"
#include "Types.h"
#include "Display.h"
#include "Node.h"
#include "Camera.h"
#include "Sprite.h"
#include "Terrain.h"
#include "Sky.h"
#include "Scene.h"

namespace Brainstem 
{
	class IDirector : public ITask
	{
	public:

		virtual void Render(IScene* scene) = 0;

		virtual IScene* CreateScene() = 0;
		virtual IDisplay* CreateDisplay() = 0;
		virtual IDisplay* CreateDisplay(Color color) = 0;

		virtual ITexture* CreateTexture(const char* filename) = 0;

		virtual IScene* GetActiveScene() = 0;
		virtual void SetActiveScene(IScene* scene) = 0;

		virtual ISceneNode* AddTeapot(IScene* scene) = 0;
		virtual ISceneNode* AddSphere(IScene* scene, float radius, unsigned int slices, unsigned int stacks) = 0;
		virtual ISceneNode* AddBox(IScene* scene, float width, float height, float depth) = 0;
		virtual ISceneNode* AddPlane(IScene* scene, float width, float height) = 0;
		virtual ISceneNode* AddXModel(IScene* scene, const char* filename) = 0;

		virtual ISprite* AddSprite(IScene* scene) = 0;

		virtual void AddLight(IScene* scene, ILight* light) = 0;

		virtual ISky* AddSkyDome(IScene* scene) = 0;

		virtual ITerrain* AddTerrainFromFile(IScene* scene, unsigned int patches, const char* filename, float scaleFactor) = 0;
		virtual ITerrain* AddTerrainRandom(IScene* scene, unsigned int patches, int seed, float noiseSize, float persistence, int octaves, float scaleFactor) = 0;

		virtual ICamera* AddFirstPersonCamera(IScene* scene, float rotationSpeed, float movementSpeed, bool isNoClip) = 0;
		virtual ICamera* AddStaticCamera(IScene* scene, Vector3<float> target) = 0;

		bool AllowRender;
		bool AllowUpdate;

		IScene* ActiveScene;

		AUTO_OBJECT_SIZE;
		virtual const char* GetName() { return "Unknown Director"; }
	};
}

#endif