mapHandler.h 671 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#ifndef _VIZUHANDLER_H_
#define _VIZUHANDLER_H_

#include <QHash>

namespace CGoGN
{
	class GenericMap;
	namespace Utils
	{
		class VBO;
	}
}

class VBOHandler;

class MapHandler
{
public:
	MapHandler(CGoGN::GenericMap *map);
	~MapHandler();

	CGoGN::GenericMap *map()
	{
		return m_map;
	}

Pierre Kraemer's avatar
Pierre Kraemer committed
28 29 30
	VBOHandler* findVBO(QString name);
	VBOHandler* findFirstVBOMatching(QRegExp regexp);
	QList<VBOHandler*> findVBOsMatching(QRegExp regexp);
31

Pierre Kraemer's avatar
Pierre Kraemer committed
32 33
	bool addVBO(VBOHandler* vboH);
	VBOHandler* addNewVBO(QString vboName);
34

Pierre Kraemer's avatar
Pierre Kraemer committed
35
	VBOHandler* takeVBO(VBOHandler* vbo);
36 37 38 39 40 41 42

	int countVBO()
	{
		return l_vbo.count();
	}

protected:
Pierre Kraemer's avatar
Pierre Kraemer committed
43 44
	CGoGN::GenericMap* m_map;
	QList<VBOHandler*> l_vbo;
45 46 47
};

#endif