SortPolicy QML Type

为要使用的排序类型提供存储空间。更多

Import Statement: import Qt3D.Render 2.9
In C++: QSortPolicy
Inherits:

FrameGraphNode

Status: Deprecated

属性

详细说明

SortPolicy 类存储了 FrameGraph 使用的排序类型。排序类型决定绘制前如何对可绘制实体进行排序,以确定绘制顺序。当 SortPolicy 出现在 FrameGraph 中时,排序机制由sortTypes 列表决定。可以同时使用多种排序类型。如果 FrameGraph 中没有 SortPolicy,则会按照实体层次结构中出现的顺序绘制实体。

属性文档

sortTypes : list<int>

指定要使用的排序类型。

此列表可包含以下值:

  • StateChangeCost(状态更改成本)- 对对象进行排序,以尽量减少更改当前呈现状态的成本
  • BackToFront(从后到前)- 根据倒序 Z 对对象从后向前排序。更准确地说,排序键是摄像机到对象中心矢量在摄像机视图矢量上的投影的 Z 分量。
  • 材质 - 根据材质(着色器)值对物体进行排序。
  • FrontToBack(从前到后)- 从前到后排序对象。与 BackToFront 相反。
  • [自 5.14 起] 纹理 - 对对象进行排序,以尽量减少纹理变化。
  • [自 5.15 起] Uniform(均匀)- 对对象进行排序,以尽量减少均匀变化。

© 2025 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.