handle clustered models

This commit is contained in:
Anakin
2016-11-13 12:15:33 +01:00
parent bbe657d030
commit 8929717c9f
6 changed files with 123 additions and 94 deletions

View File

@@ -20,17 +20,21 @@ struct ChunkHeader {
std::streampos position;
};
struct Segment {
std::string texture = "";
float* vertex = nullptr;
float* uv = nullptr;
std::uint32_t* mesh = nullptr;
std::uint32_t meshSize = 0;
};
struct Modl {
std::string name = "";
std::string parent = "";
Mtyp type = null;
std::int32_t renderFlags = -1;
glm::mat4 m4x4Translation = glm::mat4(1.0f);
std::string texture = "";
float* vertex = nullptr;
float* uv = nullptr;
std::uint32_t* mesh = nullptr;
std::uint32_t meshSize = 0;
std::vector<Segment*> segmLst;
};
@@ -55,8 +59,8 @@ private:
void analyseGeomChunks(Modl* dataDestination, std::list<ChunkHeader*> &chunkList);
void analyseSegmChunks(Modl* dataDestination, std::list<ChunkHeader*> &chunkList);
void analyseClthChunks(Modl* dataDestination, std::list<ChunkHeader*> &chunkList);
void readVertex(Modl* dataDestination, std::streampos position);
void readUV(Modl* dataDestination, std::streampos position);
void readVertex(Segment* dataDestination, std::streampos position);
void readUV(Segment* dataDestination, std::streampos position);
public: