Qt Quick 3D

Qt Quick 3D

Qt Quick 3D provides a high-level API for creating 3D content and 3D user interfaces based on Qt Quick. Rather than using an external engine, which creates syncing issues and additional layers of abstraction, Qt Quick 3D provides extensions to the existing Qt Quick Scene Graph for spatial content and a renderer for that extended scene graph. When using the spatial scene graph, it's possible to mix Qt Quick 2D content with 3D content.

​Qt Quick 3D提供了一个高级API,用于创建基于Qt Quick的3D内容和3D用户界面。Qt Quick 3D没有使用外部引擎(这会产生同步问题和额外的抽象层),而是为空间内容提供了对现有Qt Quick Scene Graph的扩展,并为扩展的场景图提供了渲染器。使用空间场景图时,可以将Qt Quick 2D内容与3D内容混合使用。

Qt Quick 3D also provides for XR and VR applications with Qt Quick 3D Xr.

​Qt Quick 3D还通过Qt Quick 3D XR提供XR和VR应用程序。

Using the Module

使用模块

QML API

The QML types of the module are available through the QtQuick3D import. To use the types, add the following import statement to your .qml file:

QML类型的模块可通过QtQuick3D导入获得。要使用这些类型,请将以下导入语句添加到.qml文件中:

import QtQuick3D

The following module imports provide additional functionality:

以下模块导入提供了附加功能:

import QtQuick3D.AssetUtils
import QtQuick3D.Helpers
import QtQuick3D.Particles3D
import QtQuick3D.Xr

C++ API

Using a Qt module's C++ API requires linking against the module library, either directly or through other dependencies. Several build tools have dedicated support for this, including CMake and qmake.

​使用Qt模块的C++API需要直接或通过其他依赖关系链接到模块库。有几个构建工具专门支持这一点,包括CMake和qmake。

Building with CMake
使用CMake构建

Use the find_package() command to locate the needed module component in the Qt6 package:

使用find_package()命令在Qt6包中查找所需的模块组件:

find_package(Qt6 REQUIRED COMPONENTS Quick3D)
target_link_libraries(mytarget PRIVATE Qt6::Quick3D)

For more details, see the Build with CMake overview.

​有关更多详细信息,请参阅使用CMake构建概述。

Building with qmake
使用qmake构建

To configure the module for building with qmake, add the module as a value of the QT variable in the project's .pro file:

要配置模块以使用qmake进行构建,请将模块添加为项目.pro文件中QT变量的值:

QT += quick3d

Building From Source

从源码构建

When building from source, ensure that the modules and tools from the qtdeclarative and qtshadertools repositories are built first, as it's not possible to use Qt Quick 3D without these. Having qtquicktimeline available is strongly recommended as well, since keyframe-based animations will not be available otherwise.

从源代码构建时,请确保首先构建qtdeclarative和qtshadertools存储库中的模块和工具,因为没有这些模块和工具就无法使用Qt Quick 3D。强烈建议使用qtquicktimeline,因为否则将无法使用基于关键帧的动画。

In addition, some of the examples rely on Qt Quick Controls.

​此外,一些示例依赖于QtQuick控制。

Module Evolution

模块演进

Changes to Qt Quick 3D lists important changes in the module API and functionality that were done for the Qt 6 series of Qt.

Qt Quick 3D的更改列出了为Qt的Qt 6系列所做的模块API和功能的重要更改。

Articles and Guides

文章和指南

Examples

示例

Reference

参考

相关模块

Licenses and Attributions

许可证和属性

Qt Quick 3D is available under the commercial license from The Qt Company. In addition, it is available under the GNU General Public License, version 3. See Qt Licensing for further details.

​Qt Quick 3D可从Qt公司获得商业许可。此外,它还可以在GNU通用公共许可证第3版下使用。有关更多详细信息,请参阅Qt许可。

Furthermore, Qt Quick 3D potentially contains third party modules under the following permissive licenses:

此外,Qt Quick 3D可能包含以下许可证下的第三方模块:

Godot Engine: Fog

MIT License

Godot Engine: ProceduralSky

MIT License

Intel Embree, version 3.13.3

Apache License 2.0

Open Asset Import Library, version 5.4.0

BSD 3-clause "New" or "Revised" Licensee

Tiny OpenEXR, version v1.0.8

BSD 3-clause "New" or "Revised" License

meshoptimizer, version v0.18

MIT License

xatlas, version 16ace528acd2cf1f16a7c0dde99c42c486488dbe

MIT License

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值