diff options
author | Mike Krus <mike.krus@kdab.com> | 2020-01-22 21:35:32 +0000 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2020-02-27 06:29:57 +0000 |
commit | 17706144e9dc6c2dfde580b7821f18c5f6924682 (patch) | |
tree | 5f77929db358607fe63a1d438b7a746a6966cbfb /tests/auto/animation/qmorphtarget | |
parent | 7f625e93620b313466d0223e911c0c3a5b492617 (diff) |
Geometry refactoring
Move QBuffer, QAttribute, QGeometry to Qt3DCore.
Change-Id: I59dfd091eefadcada93350b3aba955f40b304385
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'tests/auto/animation/qmorphtarget')
-rw-r--r-- | tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp b/tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp index 2cba9ba2a..1511ea167 100644 --- a/tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp +++ b/tests/auto/animation/qmorphtarget/tst_qmorphtarget.cpp @@ -50,11 +50,11 @@ private Q_SLOTS: { // GIVEN Qt3DAnimation::QMorphTarget morphTarget; - Qt3DRender::QAttribute attribute1; - Qt3DRender::QAttribute attribute2; + Qt3DCore::QAttribute attribute1; + Qt3DCore::QAttribute attribute2; - attribute1.setName(Qt3DRender::QAttribute::defaultPositionAttributeName()); - attribute2.setName(Qt3DRender::QAttribute::defaultNormalAttributeName()); + attribute1.setName(Qt3DCore::QAttribute::defaultPositionAttributeName()); + attribute2.setName(Qt3DCore::QAttribute::defaultNormalAttributeName()); { // WHEN @@ -63,7 +63,7 @@ private Q_SLOTS: // THEN QStringList names = morphTarget.attributeNames(); QCOMPARE(names.size(), 1); - QCOMPARE(names.at(0), Qt3DRender::QAttribute::defaultPositionAttributeName()); + QCOMPARE(names.at(0), Qt3DCore::QAttribute::defaultPositionAttributeName()); } { @@ -73,23 +73,23 @@ private Q_SLOTS: // THEN QStringList names = morphTarget.attributeNames(); QCOMPARE(names.size(), 2); - QCOMPARE(names.at(1), Qt3DRender::QAttribute::defaultNormalAttributeName()); + QCOMPARE(names.at(1), Qt3DCore::QAttribute::defaultNormalAttributeName()); } } void testFromGeometry() { // GIVEN - Qt3DRender::QGeometry geometry; - Qt3DRender::QAttribute *attribute1 = new Qt3DRender::QAttribute; - Qt3DRender::QAttribute *attribute2 = new Qt3DRender::QAttribute; - attribute1->setName(Qt3DRender::QAttribute::defaultPositionAttributeName()); - attribute2->setName(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName()); + Qt3DCore::QGeometry geometry; + Qt3DCore::QAttribute *attribute1 = new Qt3DCore::QAttribute; + Qt3DCore::QAttribute *attribute2 = new Qt3DCore::QAttribute; + attribute1->setName(Qt3DCore::QAttribute::defaultPositionAttributeName()); + attribute2->setName(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName()); geometry.addAttribute(attribute1); geometry.addAttribute(attribute2); QStringList attributes; - attributes.push_back(Qt3DRender::QAttribute::defaultPositionAttributeName()); + attributes.push_back(Qt3DCore::QAttribute::defaultPositionAttributeName()); { // WHEN @@ -99,20 +99,20 @@ private Q_SLOTS: // THEN QStringList names = morphTarget->attributeNames(); QCOMPARE(names.size(), 1); - QCOMPARE(names.at(0), Qt3DRender::QAttribute::defaultPositionAttributeName()); + QCOMPARE(names.at(0), Qt3DCore::QAttribute::defaultPositionAttributeName()); } { // WHEN - attributes.push_back(Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName()); + attributes.push_back(Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName()); QScopedPointer<Qt3DAnimation::QMorphTarget> morphTarget( Qt3DAnimation::QMorphTarget::fromGeometry(&geometry, attributes)); // THEN QStringList names = morphTarget->attributeNames(); QCOMPARE(names.size(), 2); - QCOMPARE(names.at(0), Qt3DRender::QAttribute::defaultPositionAttributeName()); - QCOMPARE(names.at(1), Qt3DRender::QAttribute::defaultTextureCoordinateAttributeName()); + QCOMPARE(names.at(0), Qt3DCore::QAttribute::defaultPositionAttributeName()); + QCOMPARE(names.at(1), Qt3DCore::QAttribute::defaultTextureCoordinateAttributeName()); } } |