import msh file,
problems: it is not correctly displayed (vertice and what happend to the texture?) todo: improve the import, remove unused garbage, add move and zoom function
This commit is contained in:
34
QtMeshViewer/Header/MshFile.h
Normal file
34
QtMeshViewer/Header/MshFile.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include "..\Header\FileInterface.h"
|
||||
|
||||
|
||||
struct ChunkHeader {
|
||||
char name[5];
|
||||
std::uint32_t size;
|
||||
std::streampos position;
|
||||
};
|
||||
|
||||
|
||||
class MshFile : public FileInterface
|
||||
{
|
||||
public:
|
||||
explicit MshFile(const char* path);
|
||||
virtual ~MshFile();
|
||||
|
||||
private:
|
||||
virtual void import() Q_DECL_OVERRIDE Q_DECL_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);
|
||||
};
|
||||
Reference in New Issue
Block a user