summaryrefslogtreecommitdiffstats
path: root/doc/src/tutorials/simpleobject.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/tutorials/simpleobject.qdoc')
-rw-r--r--doc/src/tutorials/simpleobject.qdoc106
1 files changed, 0 insertions, 106 deletions
diff --git a/doc/src/tutorials/simpleobject.qdoc b/doc/src/tutorials/simpleobject.qdoc
deleted file mode 100644
index db6c3be3..00000000
--- a/doc/src/tutorials/simpleobject.qdoc
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtQuick3D documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** GNU Free Documentation License
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms
-** and conditions contained in a signed written agreement between you
-** and Nokia.
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \title Applying Transformations and Materials
- \keyword Object Effects
- \example qt3d/cube4
-
- In this tutorial we will apply transformations and materials to a
- simple cube object to demonstrate how to modify the QGLPainter
- state to achieve different effects.
-
- \section2 Cube in QtQuick3D
-
- It is quite simple to achieve these effects in QtQuick3D:
-
- \snippet quick3d/cube/qml/cube.qml 1
-
- \section2 Cube in Qt3D
-
- In the C++ world we start by declaring a view class to show our cube
- on the screen:
-
- \snippet qt3d/cube1/cubeview.h 1
-
- QGLView provides most of the logic for initializing the view,
- setting the camera position, and handling navigation via
- keyboard and mouse events. In the constructor we use
- QGLBuilder to create the geometry for the cube object that
- we will be using in later steps:
-
- \snippet qt3d/cube1/cubeview.cpp 1
-
- Then it is a simple matter to draw the object in our \c{paintGL()}
- method:
-
- \snippet qt3d/cube1/cubeview.cpp 2
-
- If we run the program now, we get the following output, which isn't
- very cube-like:
-
- \image tutorials/cube1-screenshot.png
-
- The problem is that we are looking at the cube straight onto its
- front face. So the rest of the cube is hidden from our view and
- it looks like a square. Let's modify the modelview transformation
- matrix a little bit to apply a 45 degree rotation around the
- axis (1, 1, 1):
-
- \snippet qt3d/cube2/cubeview.cpp 2
-
- Now the results are a little better:
-
- \image tutorials/cube2-screenshot.png
-
- The cube is still a little odd-looking however. This is because
- up until now we have been using the default flat color effect
- in QGLPainter that colors the faces with a uniform color
- (white in this case). So let's change to a lit material effect
- with a nice green color:
-
- \snippet qt3d/cube3/cubeview.cpp 2
-
- That's much better; now it looks like a cube:
-
- \image tutorials/cube3-screenshot.png
-
- To complete this tutorial, let's make the cube a little more
- interesting by adding a texture to the side:
-
- \snippet qt3d/cube4/cubeview.h 1
- \dots
- \snippet qt3d/cube4/cubeview.h 2
- \snippet qt3d/cube4/cubeview.cpp 1
- \dots
- \snippet qt3d/cube4/cubeview.cpp 2
- \snippet qt3d/cube4/cubeview.cpp 3
-
- \image tutorials/cube4-screenshot.png
-
- \l{qt3d-examples.html}{Return to the main Tutorials page}.
-*/