Qt 3D

Qt 3D 提供在 Qt C++ 和 Qt Quick 應用程序中,支持 2D 和 3D 渲染的近實時模擬係統的功能。

Qt 3D 功能被劃分成下列 C++ 模塊:

Qt3DAnimation Qt 3D Animation module provides a set of prebuilt elements to help you get started with Qt 3D
Qt3DCore Qt 3D module contains functionality to support near-realtime simulation systems
Qt3DExtras Qt 3D Extras module provides a set of prebuilt elements to help you get started with Qt 3D
Qt3DInput Qt 3D Input module provides classes for handling user input in applications using Qt3D
Qt3DLogic Qt 3D Logic module enables synchronizing frames with the Qt 3D backend
Qt3DRender Qt 3D Render module contains functionality to support 2D and 3D rendering using Qt 3D
Qt3DScene2D Qt 3D Scene2D module provides a way to render Quick2 qml content to a Qt 3D texture

對於 Qt Quick 應用程序,Qt 3D 提供下列 QML 模塊:

Qt3D.Extras 為 Extras 模塊提供 Qt 3D QML 類型
Qt3D.Input 為 Qt 3D 用戶輸入提供 QML 類型
Qt3D.Logic 提供具有 3D 後端的同步幀的 QML 類型
Qt3D.Core 提供核心 Qt 3D QML 類型
Qt3D.Animation 為動畫模塊提供 Qt 3D QML 類型
Qt3D.Render 為渲染提供 Qt 3D QML 類型
QtQuick.Scene2D 為 Scene2D 模塊提供 Qt 3D QML 類型

快速入門

For a C++ application that performs 2D or 3D rendering, collision detection, and also handle user input, add the following line to its qmake .pro 文件:

QT += 3dcore 3drender 3dinput 3dlogic 3dextras 3danimation
					

要包括模塊類定義,使用以下指令:

#include <Qt3DCore>
#include <Qt3DRender>
#include <Qt3DInput>
#include <Qt3DLogic>
#include <Qt3DExtras>
#include <Qt3DAnimation>
					

Qt Quick 應用程序還需額外依賴:

QT += 3dcore 3drender 3dinput 3dlogic 3dextras qml quick 3dquick 3danimation
					
					

概述

Qt 3D 高級設計、動機的描述在 Qt 3D 概述 。Qt 3D 渲染方麵提供對數據驅動配置的支持,作為描述在 Qt 3D 渲染 FrameGraph .

參考

Qt 3D 平颱支持

Qt 3D 支持下列平颱:

  • 微軟 Windows (win32) - 支持
  • Linux X11 - 支持
  • macOS - 支持 (盡管可能有一些視網膜比例縮放問題)
  • Android - 支持
  • 嵌入式 Linux - 支持
  • iOS - 從 Qt5.7 起支持
  • WinRT - 尚不支持

許可和歸屬

Qt 3D 在商業許可下是可用的來自 Qt 公司 。此外,它是可用的根據 GNU LGPL (次一般公共許可) 第 3 版 ,或 GNU GPL (一般公共許可) 第 2 版 。見 Qt 許可 進一步瞭解細節。

此外,Qt 3D 包含的第 3 方模塊遵循下列準許許可:

Open Asset Import Library BSD 3 條款新 (或修訂) 許可