mapHandler.h 808 Bytes
Newer Older
1 2
#ifndef _MAPHANDLER_H_
#define _MAPHANDLER_H_
3

4 5
#include <QString>
#include "types.h"
6 7 8 9 10 11 12 13 14 15 16 17 18

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

class MapHandler
{
public:
19
	MapHandler(const QString& name, CGoGN::GenericMap* map);
20 21
	~MapHandler();

22 23
	const QString& getName() { return m_name; }
	void setName(const QString& name) { m_name = name; }
24

25
	CGoGN::GenericMap* getMap() { return m_map; }
26

27 28 29 30 31
	CGoGN::Utils::VBO* addVBO(const QString& name);
	void removeVBO(const QString& name);
	CGoGN::Utils::VBO* getVBO(const QString& name);
	CGoGN::Utils::VBO* findFirstVBOMatching(const QRegExp& regexp);
	QList<CGoGN::Utils::VBO*> findVBOsMatching(const QRegExp& regexp);
32

33
	int getNbVBO() { return h_vbo.count(); }
34 35

protected:
36
	QString m_name;
Pierre Kraemer's avatar
Pierre Kraemer committed
37
	CGoGN::GenericMap* m_map;
38 39

	VBOHash h_vbo;
40 41 42
};

#endif