/****************************************************************************
**
** Copyright (C) 2021 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.
**
****************************************************************************/

/*!
    \page studio-3d-view.html
    \previouspage quick-animations.html
    \nextpage studio-3d-node.html

    \title 3D Views

    To create a Qt Quick 3D UI project, we recommend using a \uicontrol
    {Qt Quick 3D Application} wizard template that adds the
    \l {3D Components}{Qt Quick 3D} components to \l Library >
    \uicontrol Components and contains a 3D view. A 3D view component includes a
    \l {Scene Environment}{scene environment} as well as a scene
    \l {Lights}{light}, \l {Cameras}{camera}, and
    \l {3D Models}{model}. A default \l {Materials and Shaders}{material}
    is attached to the model. You can attach \l {Textures}{textures}
    to materials. For more information about creating projects, see \l{Creating Projects}.

    To add a 3D view to some other kind of a project, you first need to add the
    \uicontrol {Qt Quick 3D} module to \uicontrol Library, as described in
    \l {Adding and Removing Modules}.

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

    You can now drag-and-drop a \uicontrol View3D component to \l Navigator or
    to \l {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 \l 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 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 component. 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.
*/
