summaryrefslogtreecommitdiffstats
path: root/doc/src/examples/teapot.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/examples/teapot.qdoc')
-rw-r--r--doc/src/examples/teapot.qdoc101
1 files changed, 0 insertions, 101 deletions
diff --git a/doc/src/examples/teapot.qdoc b/doc/src/examples/teapot.qdoc
deleted file mode 100644
index d85fca48..00000000
--- a/doc/src/examples/teapot.qdoc
+++ /dev/null
@@ -1,101 +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$
-**
-****************************************************************************/
-
-/*!
- \example qt3d/teapot
- \title Teapot Example
-
- The Teapot example shows how Qt3D can be used to draw a simple
- teapot object with a perspective camera view in C++. There is
- also a \l{Teapot Example in QtQuick3D}{QtQuick3D version} of the teapot
- example.
-
- We start by defining a class that inherits from QGLView, which
- provides some basic scene setup logic and 3D camera navigation:
-
- \snippet qt3d/teapot/teapotview.h class-defn
- \dots
- \quotefromfile qt3d/teapot/main.cpp
- \skipuntil [main]
- \printto [main-args]
- \skipuntil [main-args-end]
- \printto [main]
-
- When the application starts up, we set up some scene parameters
- in the \c{initializeGL()} function:
-
- \quotefromfile qt3d/teapot/teapotview.cpp
- \skipuntil [initialize]
- \printto [build-geometry]
-
- The first line of the function selects a standard rendering
- effect that lights material colors with the default OpenGL
- two-sided lighting algorithm and the default light.
-
- The \c{teapot} member variable is an instance of QGLSceneNode,
- which we create using QGLBuilder during \c{initializeGL()}:
-
- \quotefromfile qt3d/teapot/teapotview.cpp
- \skipuntil [build-geometry]
- \printto [initialize]
-
- The QGLTeapot class represents the geometry for the teapot,
- which is added to the builder with the \c{<<} operator.
-
- We then call QGLBuilder::finalizedSceneNode() to finalize the
- object, prepare it to be uploaded to the GL server as a
- vertex buffer, and hand over ownership of the scene node.
-
- We have to take care to clean up our scene after we're done with it
- and here that is done in the destructor:
-
- \snippet qt3d/teapot/teapotview.cpp destructor
-
- Finally, we paint the teapot every time the window is refreshed:
-
- \snippet qt3d/teapot/teapotview.cpp paint
-
- The QGLView class has in-built support for camera navigation
- using the mouse and keyboard. By clicking and dragging the mouse,
- the teapot can be rotated into any position. The image on the
- left shows the view in its startup default position, and the
- image on the right shows the view after rotation using the mouse:
-
- \raw HTML
- <center><table><tr><td>
- \endraw
- \image teapot-screenshot.png
- \raw HTML
- </td><td>
- \endraw
- \image teapot-rotated.png
- \raw HTML
- </td></tr></table></center>
- \endraw
-
- \l{qt3d-examples.html}{Return to Examples}.
-*/