/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Design Studio documentation.
**
** 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.
**
****************************************************************************/

/*!
    \previouspage studio-3d-editor.html
    \page studio-3d-view.html
    \nextpage studio-3d-components.html

    \title Adding 3D Views

    To create a Qt Quick 3D UI project, we recommend using a \uicontrol
    {Qt Quick 3D Application Template} wizard template that imports the
    \l{Qt Quick 3D} QML types to the \uicontrol {QML Types} tab in
    \uicontrol Library and contains a 3D view. A 3D view type includes a
    \l {Setting Scene Environment}{scene environment} as well as a scene
    \l {Using Lights}{light}, \l {Using Scene Camera}{camera}, and \l {Adding
    Models}{model}. A default \l {Using Materials and Shaders}{material} is
    attached to the model. You can attach \l {Attaching Textures to Materials}
    {textures} to materials. For more information about creating projects, see
    \l{Creating Projects}.

    To add a 3D view to some other kind of project and to display the Qt Quick
    3D QML types in \uicontrol Library, select \uicontrol Library >
    \uicontrol {QML Imports} > \uicontrol {Add Import} > \uicontrol QtQuick3D.

    \image studio-qtquick-3d-components.png "Qt Quick 3D components in Library"

    After importing the Qt Quick 3D QML types, drag and drop a \uicontrol
    View3D type to \uicontrol Navigator or to \uicontrol {Form Editor}.

    \image studio-navigator-view3d.png "A View 3D component in the Navigator"

    By default, a directional light and a perspective camera are used in a 3D
    scene created by using the wizard template mentioned above. To use other
    light and camera types, select the component in \uicontrol {3D Editor} or
    \uicontrol Navigator and change the type of the component in the \uicontrol
    Type field in \uicontrol Properties. For example, to use a point light,
    enter \e {PointLight}.

    \image studio-3d-properties-type.png "Type field in Properties view"

    Similarly to other components, you can select a 3D view in \uicontrol
    Navigator or \uicontrol {3D Editor} and modify its property values in the
    \uicontrol Properties view. Use the properties in the \uicontrol View3D
    tab to set some properties specific to a 3D view component.

    \image studio-qtquick-3d-view.png "View 3D component properties"

    The \uicontrol Camera property defines which camera is used to render the
    scene to \uicontrol {Form Editor}. If this property is not defined, the
    first enabled camera in the scene will be used.

    The \uicontrol Environment property specifies the \uicontrol
    {Scene Environment} used to render the scene. By default, the first
    \uicontrol {Scene Environment} in the scene is set as the property value.

    The \uicontrol {Import Scene} property defines the ID of the component to
    render to \uicontrol {Form Editor}. The component does not have to be a
    child of a 3D view type. This referenced component becomes a sibling to
    child items of a 3D view, if there are any. You can use this property, for
    example, to create a split screen view showing your scene from multiple
    cameras. For more information on how to to use a 3D view to show a scene
    from multiple cameras, see \l {Qt Quick 3D - View3D Example}.

    \note The \uicontrol {Import Scene} property can only be set once.
    Subsequent changes will have no effect.

*/
