summaryrefslogtreecommitdiffstats
path: root/src/animation/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/animation/backend')
-rw-r--r--src/animation/backend/animationclip.cpp4
-rw-r--r--src/animation/backend/gltfimporter.cpp36
-rw-r--r--src/animation/backend/gltfimporter_p.h8
3 files changed, 24 insertions, 24 deletions
diff --git a/src/animation/backend/animationclip.cpp b/src/animation/backend/animationclip.cpp
index 2c7e4fffb..9f18b5eed 100644
--- a/src/animation/backend/animationclip.cpp
+++ b/src/animation/backend/animationclip.cpp
@@ -42,7 +42,7 @@
#include <Qt3DAnimation/private/animationlogging_p.h>
#include <Qt3DAnimation/private/managers_p.h>
#include <Qt3DAnimation/private/gltfimporter_p.h>
-#include <Qt3DRender/private/qurlhelper_p.h>
+#include <Qt3DCore/private/qurlhelper_p.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qfile.h>
@@ -187,7 +187,7 @@ void AnimationClip::loadAnimation()
void AnimationClip::loadAnimationFromUrl()
{
// TODO: Handle remote files
- QString filePath = Qt3DRender::QUrlHelper::urlToLocalFileOrQrc(m_source);
+ QString filePath = Qt3DCore::QUrlHelper::urlToLocalFileOrQrc(m_source);
QFile file(filePath);
if (!file.open(QIODevice::ReadOnly)) {
qWarning() << "Could not find animation clip:" << filePath;
diff --git a/src/animation/backend/gltfimporter.cpp b/src/animation/backend/gltfimporter.cpp
index f7907b3c2..82401dd5e 100644
--- a/src/animation/backend/gltfimporter.cpp
+++ b/src/animation/backend/gltfimporter.cpp
@@ -193,7 +193,7 @@ GLTFImporter::BufferView::BufferView(const QJsonObject &json)
}
GLTFImporter::AccessorData::AccessorData()
- : type(Qt3DRender::QAttribute::Float)
+ : type(Qt3DCore::QAttribute::Float)
, dataSize(0)
, count(0)
, byteOffset(0)
@@ -369,39 +369,39 @@ GLTFImporter::Node::Node(const QJsonObject &json)
skinIndex = skinValue.toInt();
}
-Qt3DRender::QAttribute::VertexBaseType GLTFImporter::accessorTypeFromJSON(int componentType)
+Qt3DCore::QAttribute::VertexBaseType GLTFImporter::accessorTypeFromJSON(int componentType)
{
if (componentType == GL_BYTE)
- return Qt3DRender::QAttribute::Byte;
+ return Qt3DCore::QAttribute::Byte;
else if (componentType == GL_UNSIGNED_BYTE)
- return Qt3DRender::QAttribute::UnsignedByte;
+ return Qt3DCore::QAttribute::UnsignedByte;
else if (componentType == GL_SHORT)
- return Qt3DRender::QAttribute::Short;
+ return Qt3DCore::QAttribute::Short;
else if (componentType == GL_UNSIGNED_SHORT)
- return Qt3DRender::QAttribute::UnsignedShort;
+ return Qt3DCore::QAttribute::UnsignedShort;
else if (componentType == GL_UNSIGNED_INT)
- return Qt3DRender::QAttribute::UnsignedInt;
+ return Qt3DCore::QAttribute::UnsignedInt;
else if (componentType == GL_FLOAT)
- return Qt3DRender::QAttribute::Float;
+ return Qt3DCore::QAttribute::Float;
// There shouldn't be an invalid case here
qWarning("unsupported accessor type %d", componentType);
- return Qt3DRender::QAttribute::Float;
+ return Qt3DCore::QAttribute::Float;
}
-uint GLTFImporter::accessorTypeSize(Qt3DRender::QAttribute::VertexBaseType componentType)
+uint GLTFImporter::accessorTypeSize(Qt3DCore::QAttribute::VertexBaseType componentType)
{
switch (componentType) {
- case Qt3DRender::QAttribute::Byte:
- case Qt3DRender::QAttribute::UnsignedByte:
+ case Qt3DCore::QAttribute::Byte:
+ case Qt3DCore::QAttribute::UnsignedByte:
return 1;
- case Qt3DRender::QAttribute::Short:
- case Qt3DRender::QAttribute::UnsignedShort:
+ case Qt3DCore::QAttribute::Short:
+ case Qt3DCore::QAttribute::UnsignedShort:
return 2;
- case Qt3DRender::QAttribute::Int:
- case Qt3DRender::QAttribute::Float:
+ case Qt3DCore::QAttribute::Int:
+ case Qt3DCore::QAttribute::Float:
return 4;
default:
@@ -522,12 +522,12 @@ GLTFImporter::AnimationNameAndChannels GLTFImporter::createAnimationData(int ani
const auto &inputAccessor = m_accessors[sampler.inputAccessorIndex];
const auto &outputAccessor = m_accessors[sampler.outputAccessorIndex];
- if (inputAccessor.type != Qt3DRender::QAttribute::Float) {
+ if (inputAccessor.type != Qt3DCore::QAttribute::Float) {
qWarning() << "Input accessor has wrong data type. Skipping channel.";
continue;
}
- if (outputAccessor.type != Qt3DRender::QAttribute::Float) {
+ if (outputAccessor.type != Qt3DCore::QAttribute::Float) {
qWarning() << "Output accessor has wrong data type. Skipping channel.";
continue;
}
diff --git a/src/animation/backend/gltfimporter_p.h b/src/animation/backend/gltfimporter_p.h
index e31f8d078..ef0486181 100644
--- a/src/animation/backend/gltfimporter_p.h
+++ b/src/animation/backend/gltfimporter_p.h
@@ -50,7 +50,7 @@
#include <QtGlobal>
#include <Qt3DAnimation/private/fcurve_p.h>
-#include <Qt3DRender/qattribute.h>
+#include <Qt3DCore/qattribute.h>
#include <Qt3DCore/private/sqt_p.h>
#include <Qt3DCore/private/qmath3d_p.h>
@@ -100,7 +100,7 @@ public:
explicit AccessorData(const QJsonObject &json);
int bufferViewIndex;
- Qt3DRender::QAttribute::VertexBaseType type;
+ Qt3DCore::QAttribute::VertexBaseType type;
uint dataSize;
int count;
int byteOffset;
@@ -190,8 +190,8 @@ public:
AnimationNameAndChannels createAnimationData(int animationIndex, const QString &animationName = QString()) const;
private:
- static Qt3DRender::QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
- static uint accessorTypeSize(Qt3DRender::QAttribute::VertexBaseType componentType);
+ static Qt3DCore::QAttribute::VertexBaseType accessorTypeFromJSON(int componentType);
+ static uint accessorTypeSize(Qt3DCore::QAttribute::VertexBaseType componentType);
static uint accessorDataSizeFromJson(const QString &type);
struct RawData