using c++11 loops,

reading bbox for each geom,
added some TODO
use the bbox information
This commit is contained in:
Anakin
2016-11-28 14:04:09 +01:00
parent 5ab2f2eaf9
commit ef2c341a1a
4 changed files with 81 additions and 72 deletions

View File

@@ -14,6 +14,12 @@ enum Mtyp {
shadowMesh = 6
};
struct Bbox {
float quaternion[4];
float center[3];
float extents[3];
};
struct ChunkHeader {
char name[5];
std::uint32_t size;
@@ -33,6 +39,7 @@ struct Modl {
Mtyp type = null;
std::int32_t renderFlags = -1;
glm::mat4 m4x4Translation = glm::mat4(1.0f);
Bbox boundingBox;
std::vector<Segment*> segmLst;
};
@@ -49,7 +56,6 @@ private:
std::fstream fsMesh;
std::vector<std::string> vTextures;
private:
void loadChunks(std::list<ChunkHeader*> &destination, std::streampos start, const std::uint32_t end);
void analyseMsh2Chunks(std::list<ChunkHeader*> &chunkList);