| 1 |
// Copyright (C) 2016 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only |
| 3 |
|
| 4 |
/*! |
| 5 |
\example scene3d |
| 6 |
\title Qt 3D: Scene3D QML Example |
| 7 |
\ingroup qt3d-examples-qml |
| 8 |
\brief A QML application that demonstrates visualizing a 3D scene. |
| 9 |
|
| 10 |
\image scene3d.png |
| 11 |
|
| 12 |
This example demonstrates visualizing a 3D scene from a Qt Quick |
| 13 |
application. The 3D scene contains a single active camera and a single |
| 14 |
active light source. Visualized data is assumed to be at a fixed location. |
| 15 |
|
| 16 |
\include examples-run.qdocinc |
| 17 |
|
| 18 |
\section1 Visualizing 3D Scenes |
| 19 |
|
| 20 |
We set up the 3D scene and specify the entity to animate in \e main.qml: |
| 21 |
|
| 22 |
\snippet scene3d/main.qml 0 |
| 23 |
|
| 24 |
We specify the active camera in \e scene3d/AnimatedEntity.qml: |
| 25 |
|
| 26 |
\snippet scene3d/AnimatedEntity.qml 0 |
| 27 |
*/ |