#ifndef SCENEGRAPH_H
#define SCENEGRAPH_H

#include <map>

#include "Utility.h"


namespace nsSceneGraph {

// forward declarations
class GraphNode;
class SceneGraphVisitor;

enum
{
	SG_OK = 0,
	SG_KO = 1
};


typedef enum
{
	GRAPHNODE = 0,
	GROUP = 1,
	TRANSFORM = 2,
	MATERIAL = 3,
	VERTEXARRAY = 4
} NodeType;


class SceneGraph
{
	private:
		GraphNode *scene;
		std::map<const char *, GraphNode *, nsUtility::CStringCompare> nodeTable;

		void nodeTableCreateTravese(GraphNode *node);

	public:
		SceneGraph(void);
		SceneGraph(GraphNode *scene);
		~SceneGraph(void);

		void setScene(GraphNode *scene);
		GraphNode *getScene(void);

		void nodeTableCreate(void);
		GraphNode *nodeTableLookUp(const char *nodeName);

		int action(SceneGraphVisitor *visitor);

		void printGraph(void);
};


}

#endif

