Commit ef2c341a authored by Anakin's avatar Anakin

using c++11 loops,

reading bbox for each geom,
added some TODO
use the bbox information
parent 5ab2f2ea
......@@ -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);
......
This diff is collapsed.
......@@ -109,6 +109,7 @@ void OpenGLController::processInit()
void OpenGLController::deleteVectors()
{
//TODO: does .clear() work, too??
if (vModels != NULL)
{
while (!vModels->empty())
......
......@@ -17,7 +17,7 @@ int main(int argc, char** argv)
else
scene = OpenGLController::getInstance();
scene->loadMsh("..\\Release\\Msh\\quadPoly.msh");
scene->loadMsh("..\\Release\\Msh\\multiModTex.msh");
do {
scene->updateScene();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment