diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-03-21 12:29:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-30 12:37:56 +0200 |
commit | 3aab83685122e2391c3080f250d334a923a8b3f4 (patch) | |
tree | 84e7986ed2e21afdfce5420087e6575c1ee67ca8 /src/render/io/gltfparser.cpp | |
parent | 185905b9d6219ab13d1cf3628cc529528a75fb34 (diff) |
Transform component
Moved transforms out of Entity. That way it will be possible to properly
separate camera optics and transformations as well as having Entity
without a list of transfmortations.
Note : This commits breaks matrices computations as matrix is removed
from entity. Matrices computations will be restored when the framegraph
is implemented.
Change-Id: Ibdd0f23a49a8666385b086ecc551c8fad3b9a420
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/io/gltfparser.cpp')
-rw-r--r-- | src/render/io/gltfparser.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/render/io/gltfparser.cpp b/src/render/io/gltfparser.cpp index 0cb78417d..eebd4a0ac 100644 --- a/src/render/io/gltfparser.cpp +++ b/src/render/io/gltfparser.cpp @@ -50,6 +50,8 @@ #include <shaderprogram.h> #include <effect.h> #include <camera.h> +#include <transform.h> +#include <matrixtransform.h> #include <QJsonDocument> #include <QJsonObject> @@ -344,7 +346,10 @@ Entity* GLTFParser::node(QString id) m(i % 4, i >> 2) = v; } - result->setMatrix( m ); + // ADD MATRIX TRANSFORM COMPONENT TO ENTITY + Transform *trans = new Transform(); + trans->appendTransfrom(new MatrixTransform(m)); + result->addComponent(trans); } if ( jsonObj.contains(KEY_CAMERA) ) |