本页内容

LodManager QML Type

负责处理详细级别可见性变更的管理器。更多...

Import Statement: import QtQuick3D.Helpers
Inherits:

Node

属性

详细说明

该辅助组件提供了一种处理细节级别变化的方法。其工作原理是根据与摄像机的距离来调整子节点的可见性。阈值由用户通过“距离列表”进行设定。 第一个距离是管理器在显示第一个子节点、第二个子节点等之间切换时的阈值。第一个子节点应为细节最丰富的那个,因为它在摄像机靠近时显示。如果设置了fadeDistance ,管理器将通过调整模型的不透明度来实现模型之间的交叉淡入淡出。淡入淡出效果仅适用于模型节点。

View3D {
    LodManager {
        camera: camera
        distances: [50, 100]
        fadeDistance: 10

        Model { ... }
        Model { ... }
        Model { ... }
    }
}

属性文档

camera : QtQuick3D::Camera

指定用于计算到子节点距离的摄像机。

distances : list

指定详细级别发生变化的阈值。第一个数字表示第一个节点变为第二个节点时的距离,以此类推。

fadeDistance : real

指定细节级别之间开始淡入淡出的距离。

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