handle clustered models
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user