diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2017-08-06 18:58:46 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-08-16 13:19:23 +0000 |
commit | 5c6634f2d1cd9a016142c3641ab6d797f5fe4ba7 (patch) | |
tree | ccbad78b2839b26b1f10cf5aa112786df56bd018 /tests/manual | |
parent | b236f982170779a1836f7d391428287921422163 (diff) |
Update skinned mesh example to expose joints of object
To do this we add a helper Sqt struct that wraps up an affine
transformation as a scale vector, rotation quaternion and a
translation vector. This is the format in which the animation
aspect will animate the joints later so it's easier to keep
the transforms split like this. It's also less data to move
around compared with a 4x4 matrix (10 vs 16 floats, 12 including
the padding).
Change-Id: Iaa30b5ef5d1635cc208ead918827140cf2765908
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/skinned-mesh/SkinnedEntity.qml | 2 | ||||
-rw-r--r-- | tests/manual/skinned-mesh/main.qml | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/manual/skinned-mesh/SkinnedEntity.qml b/tests/manual/skinned-mesh/SkinnedEntity.qml index 455f3869e..3abafa209 100644 --- a/tests/manual/skinned-mesh/SkinnedEntity.qml +++ b/tests/manual/skinned-mesh/SkinnedEntity.qml @@ -8,6 +8,7 @@ Entity { property Effect effect: skinnedPbrEffect property url source: "" + property alias createJointsEnabled: skeleton.createJointsEnabled property alias transform: transform property color baseColor: "red" @@ -21,6 +22,7 @@ Entity { }, Armature { skeleton: SkeletonLoader { + id: skeleton source: root.source onStatusChanged: console.log("skeleton loader status: " + status) onJointCountChanged: console.log("skeleton has " + jointCount + " joints") diff --git a/tests/manual/skinned-mesh/main.qml b/tests/manual/skinned-mesh/main.qml index 31c618382..a3d8e3d12 100644 --- a/tests/manual/skinned-mesh/main.qml +++ b/tests/manual/skinned-mesh/main.qml @@ -73,5 +73,6 @@ DefaultSceneEntity { baseColor: "blue" transform.scale: 0.05 transform.translation: Qt.vector3d(0.5, 0.25, 0.0) + createJointsEnabled: true } } |