summaryrefslogtreecommitdiffstats
path: root/src/render/geometry/joint_p.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-08-10 20:41:17 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-08-16 13:19:28 +0000
commite11df19a6854c9fb4cb1138fa619d3030b9eea8b (patch)
treed233cd03611607ae825244fd96c3e4d8aa9452e4 /src/render/geometry/joint_p.h
parenta06c583bd21985d6b1da680fdb8dc6bebef18f9e (diff)
Create SkeletonData from Joint backend nodes
This can be done either by using a QSkeleton on the frontend or with a QSkeletonLoader that has the createJointsEnabled property set to true. In the latter case, the loader creates the joint node hierarchy on the backend then moves them to the main thread in a similar way to QGeometryRenderer handles Geoemtry. Once the joint hierarchy is set on the frontend QSkeletonLoader, it notifies the backend and from there it follows the same code path as for QSkeleton. Change-Id: I5f673e154bb3a3e677b80b8ee984f4168403c288 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/geometry/joint_p.h')
-rw-r--r--src/render/geometry/joint_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/render/geometry/joint_p.h b/src/render/geometry/joint_p.h
index 9c26154eb..c5b6737a1 100644
--- a/src/render/geometry/joint_p.h
+++ b/src/render/geometry/joint_p.h
@@ -53,6 +53,7 @@
#include <Qt3DRender/private/backendnode_p.h>
#include <Qt3DCore/private/sqt_p.h>
+#include <Qt3DRender/private/handle_types_p.h>
QT_BEGIN_NAMESPACE
@@ -78,6 +79,9 @@ public:
QQuaternion rotation() const { return m_localPose.rotation; }
QVector3D scale() const { return m_localPose.scale; }
+ void setOwningSkeleton(HSkeleton skeletonHandle) { m_owningSkeleton = skeletonHandle; }
+ HSkeleton owningSkeleton() const { return m_owningSkeleton; }
+
void setJointManager(JointManager *jointManager) { m_jointManager = jointManager; }
JointManager *jointManager() const { return m_jointManager; }
@@ -89,6 +93,7 @@ private:
QVector<Qt3DCore::QNodeId> m_childJointIds;
QString m_name;
JointManager *m_jointManager;
+ HSkeleton m_owningSkeleton;
};
class JointFunctor : public Qt3DCore::QBackendNodeMapper