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

Provides QML types to synchronize frames with the 3D backend

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 条款新 (或修订) 许可