diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2017-02-15 10:24:34 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-02-16 10:29:32 +0000 |
commit | ec787715a7cb7af5a34972356009642da45e2950 (patch) | |
tree | 556effef3385f43f0497417ce417265e16b28e37 /examples | |
parent | 0a399dbc2c0c8338522af0e106cea2d68c44c4b2 (diff) |
Extruded Text cleanup
-rename QText3DGeometry to QExtrudedTextGeometry
-rename QText3DMesh to QExtrudedTextMesh
-rename the depth property to extrusionLength
-removed the edgeSplitAngle property
-updated the example
Task-number: QTBUG-58880
Change-Id: Ib2d1a58e62b34949db12b9245f1474baf9cf9b91
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qt3d/3d-text/main.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/qt3d/3d-text/main.cpp b/examples/qt3d/3d-text/main.cpp index 40ae8b80a..17d749f94 100644 --- a/examples/qt3d/3d-text/main.cpp +++ b/examples/qt3d/3d-text/main.cpp @@ -51,8 +51,7 @@ #include <QCoreApplication> #include <Qt3DCore/Qt3DCore> #include <Qt3DExtras/Qt3DExtras> -#include <qtext3dmesh.h> -#include <qtext3dgeometry.h> +#include <Qt3DExtras/QExtrudedTextMesh> int main(int argc, char *argv[]) { @@ -85,17 +84,15 @@ int main(int argc, char *argv[]) for (QString family : fonts) { auto *text = new Qt3DCore::QEntity(root); - auto *textMesh = new Qt3DExtras::QText3DMesh(); - Qt3DExtras::QText3DGeometry *textGeometry = static_cast<Qt3DExtras::QText3DGeometry*>(textMesh->geometry()); + auto *textMesh = new Qt3DExtras::QExtrudedTextMesh(); auto *textTransform = new Qt3DCore::QTransform(); QFont font(family, 32, -1, false); textTransform->setTranslation(QVector3D(-2.45f, i * .5f, 0)); textTransform->setScale(.2f); - textGeometry->setDepth(.45f); - textGeometry->setFont(font); - textGeometry->setEdgeSplitAngle(90.f * .15f); - textGeometry->setText(QString(family)); + textMesh->setDepth(.45f); + textMesh->setFont(font); + textMesh->setText(QString(family)); textMaterial->setDiffuse(QColor(111, 150, 255)); text->addComponent(textMaterial); |