]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
in the midst of changes
authorLockedLunatic <locked.lunatic@aon.at>
Tue, 14 Apr 2015 23:26:56 +0000 (01:26 +0200)
committerLockedLunatic <locked.lunatic@aon.at>
Tue, 14 Apr 2015 23:26:56 +0000 (01:26 +0200)
Weave/Graphix/MetaModel.cpp
Weave/Graphix/Model.cpp
Weave/Graphix/Model.h

index 8ca79d0f9be83a5556171c12d9a48197ee439997..ffd6b8af85dc5417c1e10fd0962d0ceb3f727106 100644 (file)
@@ -26,7 +26,10 @@ MetaModel::MetaModel(const string& modelpath)
                Model* tmp_model=nullptr;
                for (unsigned int i = 0; i < scene->mNumMeshes; i++)
                {
-                       models.push_back(new Model(scene->mMeshes[i]));
+
+                       aiMatrix4x4 transform = scene->mRootNode->mChildren[i]->mTransformation;
+
+                       models.push_back(new Model(scene->mMeshes[i]), transform);
                }       
                
        }
@@ -35,6 +38,8 @@ MetaModel::MetaModel(const string& modelpath)
                Message::error("The file " + modelpath + " doesn't contain any nodes.");
                return;
        }
+
+
 }
 
 MetaModel::~MetaModel()
index 23bb73190a577ddaa5525f46c6cd9326b97018e5..aa1998b44b5db23a6e5bb912520d145ffb702944 100644 (file)
@@ -257,6 +257,5 @@ bool Model::import(const aiMesh* mesh, uint& numvertices, uint& numfaces, float*
                normals[3 * i + 2] = mesh->mNormals[i].z;
        }
 
-
        return true;
 }
index 82bb41ef1213ae2bb239b16ebb58ac2bbabc9b72..bd39ae6137f1e146b033052773d65c3014cec78e 100644 (file)
@@ -19,7 +19,7 @@ class Model
 {
 public:
        Model(const string& modelpath, unsigned int index=0);
-       Model(const aiMesh* mesh);
+       Model(const aiMesh* mesh, const aiMatrix4x4 modelmatrix);
        Model(unsigned int numvertices, unsigned int numfaces, float *vertex, float *uvs, float *normals, unsigned int *index);
 
        virtual ~Model();