/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt3D documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.  For licensing terms and
** conditions see http://qt.digia.com/licensing.  For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Free Documentation License Usage
** 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.  Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \example quick3d/teapot_qml
    \title Teapot Example in QML

    This example shows to use QML in \l{Qt 3D} to display a teapot on
    the screen.  The QML is fairly simple:

    \snippet ../../tutorials/quick3d/teapot_qml/qml/teapot.qml 1

    \image teapot-qml-screenshot.png

    The example starts by importing the Qt and Qt 3D QML modules:

    \snippet ../../tutorials/quick3d/teapot_qml/qml/teapot.qml 2

    Then we create a viewport of size 640x480 to display the teapot:

    \snippet ../../tutorials/quick3d/teapot_qml/qml/teapot.qml 3

    And now we create a \l Item3D to display the teapot with a
    default lit material effect:

    \snippet ../../tutorials/quick3d/teapot_qml/qml/teapot.qml 4

    The teapot data itself is loaded from \c{teapot.bez}, which contains
    Bezier patch data that describes the geometry of the teapot.

    Let's make the teapot a little more interesting by adding a
    material to simulate bone china:

    \snippet ../../tutorials/quick3d/teapot_bounce_qml/qml/teapot-bounce.qml 1
    \snippet ../../tutorials/quick3d/teapot_bounce_qml/qml/teapot-bounce.qml 2

    \image teapot-china-screenshot.png

    To make the teapot even more interesting, we can cause it to
    bounce up and down using a QML animation item:

    \snippet ../../tutorials/quick3d/teapot_bounce_qml/qml/teapot-bounce.qml 3

    This QML teapot example can be compared with the \l{qt3d/teapot}{C++ version}.
    Using QML is briefer than C++, and easier to modify to adjust
    materials and add new features like animations.

    \l{Qt 3D Tutorials and Examples}{Return to Examples}.
*/
