Summary
小结
Qt Quick 3D offers a rich way of integrating 3D contents into a Qt Quick scene, allowing a tight integration through QML.
Qt Quick 3D提供了一种将3D内容集成到Qt Quick场景的丰富方法,允许通过QML进行紧密集成。
When working with 3D contents, the most common approach is to work with assets created in other tools such as Blender, Maya, or 3ds Max. Using the Balsam tool it is possible to import meshes, materials, as well as animation skeletons, from these models into QML. This can then be used to render, as well as interacting with the models.
使用3D内容时,最常见的方法是使用在其他工具(如Blender、Maya或3ds Max)中创建的资源。使用Balsam工具,可以将网格、材质以及动画骨架从这些模型导入QML。然后可以使用它进行渲染,以及与模型交互。
QML is still used to setup the scene, as well as instantiating models. This means that a scene can be built in an external tool, or be instantiated dynamically from QML using elements created using external tool. In the most basic cases, scenes can also be created from the built in meshed that come with Qt Quick 3D.
QML仍然用于设置场景以及实例化模型。这意味着可以在外部工具中构建场景,或者使用使用外部工具创建的元素从QML动态实例化场景。在最基本的情况下,也可以从Qt Quick 3D附带的内置网格创建场景。
By allowing the tight integration of Qt Quick's 2D contents, and Qt Quick 3D, it is possible to create modern and intuit user interfaces. With QML's ability to bind C++ properties to QML properties, this makes it easy to connect 3D model state to underlying C++ state.
通过允许Qt Quick的2D内容和Qt Quick 3D的紧密集成,可以创建现代和直观的用户界面。由于QML能够将C++属性绑定到QML属性,因此很容易将三维模型状态连接到底层C++状态。
In this chapter we've only scratched the surface of what is possible using Qt Quick 3D. There are more advanced concepts ranging from custom filters and shaders, to generating meshes dynamically from C++. There is also a large set of optimization techniques that can be used to ensure good rendering performance of complex 3D contents. You can read more about this in the Qt Quick 3D Reference Documentation.
在本章中,我们仅介绍了使用Qt Quick 3D可能实现的功能。还有更高级的概念,从自定义过滤器和着色器,到从C++动态生成网格。还有大量优化技术可用于确保复杂3D内容的良好渲染性能。您可以在Qt Quick 3D Reference文档中了解更多信息。