#pragma once class Tesselator { public: typedef std::vector VertexList; typedef std::unordered_map VertexIndexMap; typedef std::pair VertexTexturePair; typedef std::map VertexUVMap; struct Polygon { const texinfo_t* texinfo; std::vector indices; }; Tesselator(const world_t* world) : world(world) { } const VertexList& getVertices() const { return vertices; } const VertexIndexMap& getVertexIndices() const { return vertexIndices; } const VertexUVMap& getVertexUVs() const { return vertexUVs; } std::vector tesselateFace(const face_t* face); private: const world_t* world; VertexList vertices; VertexIndexMap vertexIndices; VertexUVMap vertexUVs; };