/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the 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 The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \example quickitems
    \ingroup quick3d-examples
    \title Qt Quick 3D - Quick Items Example
    \brief Demonstrates the use of Qt Quick Items in Quick 3D scene.
    \image quickitems-example.png

    This example demonstrates using Qt Quick 2D items in the Quick 3D scene.

    \section1 Quick Items in a Quick 3D Scene

    Qt Quick 2D Items can be added into Quick 3D scenes with some limitations and considerations.
    When using Qt Quick Items there are a few things to note:
    \list
    \li When an \c Item is inside a \c Node, it is automatically centered and the \c Item's transforms (x, y, rotation etc.) are ignored. Instead, transforms should be added for the parent \c Node. If more than one \c Item should be affected by the same transform, then these items can be grouped together under a common parent \c Item.
    \li Items do not receive touch/mouse events e.g. with \c MouseArea, so they should be non-interactive.
    \li Quick items are not affect by lights and shadows as they are rendered by the 2D Scenegraph.
    \endlist

    \section1 The test scene

    The important parts of this example are the scene content of the \c View3D element.

    We start by adding the layer furthest away from the camera. This layer contains \c Rectangle, \c Text and \c Image elements. To ensure that the elements in the layer are positioned correctly they are grouped together under a common parent \c Item. Note that all content is clipped inside this root item so it needs to be sized appropriately.

    \snippet quickitems/main.qml background item

    Next \c Node and its items are positioned a bit closer to the camera. It contains three \c Rectangle items which animate both the x position and the rotation. Note that the animations are done on the parent \c Node while the content of the Quick \c Item remains static. From a performance perspective this is a good approach with more complex items.

    \snippet quickitems/main.qml circles item

    The third item layer of this example contains a single \c Text item with an opacity animation. The Text item is automatically centered into the parent \c Node.

    \snippet quickitems/main.qml text item

    To visualize z-ordering of the above Quick Item layers, we will also setup a model for the 3D wrecking ball. It animates rotation around the top \c Node, which makes the sphere move through the other layers.

    \snippet quickitems/main.qml wrecking ball model
*/


