#pragma once

#include "SceneObject.h"

/*class SceneGraphNode
{
	LList<SceneGraphNode*> Childs;

	virtual void Update(void);
};*/

class SceneGraph
{
	SceneObject* m_pRoot;

	void UpdateInternal(SceneObject* const pNode)
	{
		if(pNode)
		{
			pNode->Update();

			FOREACH(ch, pNode->m_Childs, SceneObject)
			{
				UpdateInternal(ch->GetInfo());
			}
		}
	}

public:
	SceneGraph(void);
	~SceneGraph(void);

	void Update(void) { UpdateInternal(m_pRoot); }

	void SetRoot(SceneObject* const pRoot) { m_pRoot = pRoot; }
	SceneObject* GetRoot(void) const { return m_pRoot; }
};
