summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/basicshapes-cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2015-08-31 15:14:17 +0100
committerSean Harmer <sean.harmer@kdab.com>2015-10-13 07:15:15 +0000
commitaf40840eedf35404ba4b39e890c158e2328ff6ec (patch)
treece4ac1f925c34b56704c99bd332e0436e68dbecc /examples/qt3d/basicshapes-cpp
parent0269afd106da5d4d999585b3bdb1332a2c01af12 (diff)
Move Render aspect into the Qt3DRender namespace
Updated examples and tests accordingly. Change-Id: I8848a88472de2302aa072fa11f21ea934672b7e6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'examples/qt3d/basicshapes-cpp')
-rw-r--r--examples/qt3d/basicshapes-cpp/main.cpp6
-rw-r--r--examples/qt3d/basicshapes-cpp/scenemodifier.cpp16
-rw-r--r--examples/qt3d/basicshapes-cpp/scenemodifier.h2
3 files changed, 12 insertions, 12 deletions
diff --git a/examples/qt3d/basicshapes-cpp/main.cpp b/examples/qt3d/basicshapes-cpp/main.cpp
index f3e5a9129..19da31f00 100644
--- a/examples/qt3d/basicshapes-cpp/main.cpp
+++ b/examples/qt3d/basicshapes-cpp/main.cpp
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
widget->setWindowTitle(QStringLiteral("Basic shapes"));
Qt3D::QAspectEngine engine;
- engine.registerAspect(new Qt3D::QRenderAspect());
+ engine.registerAspect(new Qt3DRender::QRenderAspect());
Qt3DInput::QInputAspect *input = new Qt3DInput::QInputAspect;
engine.registerAspect(input);
engine.initialize();
@@ -113,8 +113,8 @@ int main(int argc, char **argv)
input->setCamera(cameraEntity);
// FrameGraph
- Qt3D::QFrameGraph *frameGraph = new Qt3D::QFrameGraph();
- Qt3D::QForwardRenderer *forwardRenderer = new Qt3D::QForwardRenderer();
+ Qt3DRender::QFrameGraph *frameGraph = new Qt3DRender::QFrameGraph();
+ Qt3DRender::QForwardRenderer *forwardRenderer = new Qt3DRender::QForwardRenderer();
forwardRenderer->setCamera(cameraEntity);
forwardRenderer->setClearColor(QColor(QRgb(0x4d4d4f)));
diff --git a/examples/qt3d/basicshapes-cpp/scenemodifier.cpp b/examples/qt3d/basicshapes-cpp/scenemodifier.cpp
index b5c636b0f..97d8ad4be 100644
--- a/examples/qt3d/basicshapes-cpp/scenemodifier.cpp
+++ b/examples/qt3d/basicshapes-cpp/scenemodifier.cpp
@@ -44,7 +44,7 @@ SceneModifier::SceneModifier(Qt3D::QEntity *rootEntity)
// Torus shape data
//! [0]
- m_torus = new Qt3D::QTorusMesh();
+ m_torus = new Qt3DRender::QTorusMesh();
m_torus->setRadius(1.0f);
m_torus->setMinorRadius(0.4f);
m_torus->setRings(100);
@@ -69,7 +69,7 @@ SceneModifier::SceneModifier(Qt3D::QEntity *rootEntity)
//! [1]
//! [2]
- Qt3D::QPhongMaterial *torusMaterial = new Qt3D::QPhongMaterial();
+ Qt3DRender::QPhongMaterial *torusMaterial = new Qt3DRender::QPhongMaterial();
torusMaterial->setDiffuse(QColor(QRgb(0xbeb32b)));
//! [2]
@@ -82,7 +82,7 @@ SceneModifier::SceneModifier(Qt3D::QEntity *rootEntity)
//! [3]
// Cylinder shape data
- Qt3D::QCylinderMesh *cylinder = new Qt3D::QCylinderMesh();
+ Qt3DRender::QCylinderMesh *cylinder = new Qt3DRender::QCylinderMesh();
cylinder->setRadius(1);
cylinder->setLength(3);
cylinder->setRings(100);
@@ -103,7 +103,7 @@ SceneModifier::SceneModifier(Qt3D::QEntity *rootEntity)
cylinderTransforms->addTransform(cylinderRotation);
cylinderTransforms->addTransform(cylinderScale);
- Qt3D::QPhongMaterial *cylinderMaterial = new Qt3D::QPhongMaterial();
+ Qt3DRender::QPhongMaterial *cylinderMaterial = new Qt3DRender::QPhongMaterial();
cylinderMaterial->setDiffuse(QColor(QRgb(0x928327)));
// Cylinder
@@ -113,7 +113,7 @@ SceneModifier::SceneModifier(Qt3D::QEntity *rootEntity)
m_cylinderEntity->addComponent(cylinderTransforms);
// Cuboid shape data
- Qt3D::QCuboidMesh *cuboid = new Qt3D::QCuboidMesh();
+ Qt3DRender::QCuboidMesh *cuboid = new Qt3DRender::QCuboidMesh();
// CuboidMesh Transform
Qt3D::QScaleTransform *cuboidScale = new Qt3D::QScaleTransform();
@@ -126,7 +126,7 @@ SceneModifier::SceneModifier(Qt3D::QEntity *rootEntity)
cuboidTransforms->addTransform(cuboidTranslation);
cuboidTransforms->addTransform(cuboidScale);
- Qt3D::QPhongMaterial *cuboidMaterial = new Qt3D::QPhongMaterial();
+ Qt3DRender::QPhongMaterial *cuboidMaterial = new Qt3DRender::QPhongMaterial();
cuboidMaterial->setDiffuse(QColor(QRgb(0x665423)));
//Cuboid
@@ -136,7 +136,7 @@ SceneModifier::SceneModifier(Qt3D::QEntity *rootEntity)
m_cuboidEntity->addComponent(cuboidTransforms);
// Sphere shape data
- Qt3D::QSphereMesh *sphereMesh = new Qt3D::QSphereMesh();
+ Qt3DRender::QSphereMesh *sphereMesh = new Qt3DRender::QSphereMesh();
sphereMesh->setRings(20);
sphereMesh->setSlices(20);
sphereMesh->setRadius(2);
@@ -152,7 +152,7 @@ SceneModifier::SceneModifier(Qt3D::QEntity *rootEntity)
sphereTransforms->addTransform(sphereTranslation);
sphereTransforms->addTransform(sphereScale);
- Qt3D::QPhongMaterial *sphereMaterial = new Qt3D::QPhongMaterial();
+ Qt3DRender::QPhongMaterial *sphereMaterial = new Qt3DRender::QPhongMaterial();
sphereMaterial->setDiffuse(QColor(QRgb(0xa69929)));
// Sphere
diff --git a/examples/qt3d/basicshapes-cpp/scenemodifier.h b/examples/qt3d/basicshapes-cpp/scenemodifier.h
index ba4718401..c85e3e4fb 100644
--- a/examples/qt3d/basicshapes-cpp/scenemodifier.h
+++ b/examples/qt3d/basicshapes-cpp/scenemodifier.h
@@ -67,7 +67,7 @@ public slots:
private:
Qt3D::QEntity *m_rootEntity;
- Qt3D::QTorusMesh *m_torus;
+ Qt3DRender::QTorusMesh *m_torus;
Qt3D::QEntity *m_cylinderEntity;
Qt3D::QEntity *m_torusEntity;
Qt3D::QEntity *m_cuboidEntity;