summaryrefslogtreecommitdiffstats
path: root/src/plugins/sceneparsers/gltf
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2015-10-12 20:45:19 +0100
committerPaul Lemire <paul.lemire@kdab.com>2015-10-13 13:19:50 +0000
commit7c971e0e7791ab38d7d3d8ebc25468c44cbe49c5 (patch)
tree53197a9e5eb7501d6f5b497f70c25dad9c265a6f /src/plugins/sceneparsers/gltf
parent0bfd20ad3b8eb3edec8d6317af9eb5504f8c0871 (diff)
Move Qt3DCore into Qt3DCore namespace
Update other aspects, tests and examples accordingly. Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/plugins/sceneparsers/gltf')
-rw-r--r--src/plugins/sceneparsers/gltf/gltfparser.cpp14
-rw-r--r--src/plugins/sceneparsers/gltf/gltfparser_p.h12
2 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/sceneparsers/gltf/gltfparser.cpp b/src/plugins/sceneparsers/gltf/gltfparser.cpp
index a32dd7f45..61f040ca4 100644
--- a/src/plugins/sceneparsers/gltf/gltfparser.cpp
+++ b/src/plugins/sceneparsers/gltf/gltfparser.cpp
@@ -75,7 +75,7 @@
QT_BEGIN_NAMESPACE
-using namespace Qt3D;
+using namespace Qt3DCore;
namespace Qt3DRender {
@@ -185,7 +185,7 @@ bool GLTFParser::setJSON(const QJsonDocument &json )
*/
void GLTFParser::setSource(const QUrl &source)
{
- const QString path = Qt3D::QUrlHelper::urlToLocalFileOrQrc(source);
+ const QString path = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(source);
QFileInfo finfo(path);
if (!finfo.exists()) {
qCWarning(GLTFParserLog) << "missing file:" << path;
@@ -213,11 +213,11 @@ void GLTFParser::setSource(const QUrl &source)
*/
bool GLTFParser::isExtensionSupported(const QUrl &source) const
{
- const QString path = Qt3D::QUrlHelper::urlToLocalFileOrQrc(source);
+ const QString path = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(source);
return GLTFParser::isGLTFPath(path);
}
-Qt3D::QEntity* GLTFParser::node(const QString &id)
+Qt3DCore::QEntity* GLTFParser::node(const QString &id)
{
QJsonObject nodes = m_json.object().value(KEY_NODES).toObject();
if (!nodes.contains(id)) {
@@ -284,7 +284,7 @@ Qt3D::QEntity* GLTFParser::node(const QString &id)
}
// ADD MATRIX TRANSFORM COMPONENT TO ENTITY
- Qt3D::QTransform *trans = new Qt3D::QTransform();
+ Qt3DCore::QTransform *trans = new Qt3DCore::QTransform();
trans->addTransform(new QMatrixTransform(m));
result->addComponent(trans);
}
@@ -302,7 +302,7 @@ Qt3D::QEntity* GLTFParser::node(const QString &id)
return result;
}
-Qt3D::QEntity* GLTFParser::scene(const QString &id)
+Qt3DCore::QEntity* GLTFParser::scene(const QString &id)
{
parse();
@@ -459,7 +459,7 @@ QParameter *GLTFParser::parameterFromTechnique(QTechnique *technique, const QStr
return Q_NULLPTR;
}
-Qt3D::QEntity* GLTFParser::defaultScene()
+Qt3DCore::QEntity* GLTFParser::defaultScene()
{
if (m_defaultScene.isEmpty()) {
qCWarning(GLTFParserLog) << Q_FUNC_INFO << "no default scene";
diff --git a/src/plugins/sceneparsers/gltf/gltfparser_p.h b/src/plugins/sceneparsers/gltf/gltfparser_p.h
index 15698171d..448fc900e 100644
--- a/src/plugins/sceneparsers/gltf/gltfparser_p.h
+++ b/src/plugins/sceneparsers/gltf/gltfparser_p.h
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
class QFile;
-namespace Qt3D {
+namespace Qt3DCore {
class QCamera;
class QCameraLens;
class QEntity;
@@ -95,8 +95,8 @@ public:
// SceneParserInterface interface
void setSource(const QUrl &source) Q_DECL_FINAL;
bool isExtensionSupported(const QUrl &source) const Q_DECL_FINAL;
- Qt3D::QEntity *node(const QString &id) Q_DECL_FINAL;
- Qt3D::QEntity *scene(const QString &id = QString()) Q_DECL_FINAL;
+ Qt3DCore::QEntity *node(const QString &id) Q_DECL_FINAL;
+ Qt3DCore::QEntity *scene(const QString &id = QString()) Q_DECL_FINAL;
private:
class BufferData
@@ -142,9 +142,9 @@ private:
static QString standardAttributeNameFromSemantic(const QString &semantic);
static QParameter *parameterFromTechnique(QTechnique *technique, const QString &parameterName);
- Qt3D::QEntity *defaultScene();
+ Qt3DCore::QEntity *defaultScene();
QMaterial *material(const QString &id);
- Qt3D::QCameraLens *camera(const QString &id) const;
+ Qt3DCore::QCameraLens *camera(const QString &id) const;
void parse();
void cleanup();
@@ -165,7 +165,7 @@ private:
QFile* resolveLocalData(QString path) const;
QVariant parameterValueFromJSON(int type, const QJsonValue &value) const;
- static Qt3D::QAbstractAttribute::DataType accessorTypeFromJSON(int componentType);
+ static Qt3DCore::QAbstractAttribute::DataType accessorTypeFromJSON(int componentType);
static uint accessorDataSizeFromJson(const QString &type);
static QRenderState *buildStateEnable(int state);