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 Quicks创建3D内容和3D用户界面。Qt Quick 3D不是使用外部引擎,它会产生同步问题和额外的抽象层,而是为空间内容和扩展场景图的渲染器提供现有Qt Quicks场景图的扩展。使用空间场景图时,可以将Qt Quick 2D内容与3D内容混合。

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.Effects
import QtQuick3D.AssetUtils
import QtQuick3D.Helpers
import QtQuick3D.Particles3D

C++ API

Using a Qt module 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模块需要直接或通过其他依赖项链接模块库。一些构建工具对此提供了专门支持,包括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构建的模块,请将该模块作为QT变量的值添加到项目的.pro文件中:

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.

​此外,一些示例依赖于Qt Quick控件。

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 6系列Qt模块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可能包含以下许可证下的第三方模块:

Intel Embree, version 3.13.3

Apache License 2.0

Open Asset Import Library, version 5.2.3

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

ProceduralSky

MIT License

Tiny OpenEXR, version v1.0.1

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

xatlas, version 16ace528acd2cf1f16a7c0dde99c42c486488dbe

MIT License

© 2022 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
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值