SWBF2-Classic-Msh-Viewer/MeshViewerQt/Header/MshFile.h
Anakin 481256e8ea added open file ability from the old project to Qt,
texture seams not to open,
texture display does not work
2016-12-12 16:47:38 +01:00

34 lines
976 B
C++

#pragma once
#include "FileInterface.h"
struct ChunkHeader {
char name[5];
std::uint32_t size;
std::streampos position;
};
class MshFile : public FileInterface
{
public:
MshFile(const char* path);
~MshFile();
private:
virtual void import() override final;
void loadChunks(std::list<ChunkHeader*> &destination, std::streampos start, const std::uint32_t length);
void analyseMsh2Chunks(std::list<ChunkHeader*> &chunkList);
void analyseMatdChunks(std::list<ChunkHeader*> &chunkList);
void analyseModlChunks(Model* dataDestination, std::list<ChunkHeader*> &chunkList);
void analyseGeomChunks(Model* dataDestination, std::list<ChunkHeader*> &chunkList);
void analyseSegmChunks(Model* dataDestination, std::list<ChunkHeader*> &chunkList);
void analyseClthChunks(Model* dataDestination, std::list<ChunkHeader*> &chunkList);
void readVertex(Segment* dataDestination, std::streampos position);
void readUV(Segment* dataDestination, std::streampos position);
};