本页内容

ProximityFilter QML Type

选择位于目标实体距离阈值范围内的实体。更多...

Import Statement: import Qt3D.Render 2.12
In C++: QProximityFilter
Inherits:

FrameGraphNode

Status: Deprecated

此类型已弃用。我们强烈建议不要在新代码中使用它。

属性

详细说明

ProximityFilter 可用于选择当实体位于另一个实体的指定距离阈值范围内时进行渲染的实体。

import Qt3DRender 2.10
...
RenderSetting {
    Viewport {
        CameraSelector {
            camera: mainCamera
            ProximityFilter {
                entity: mainCamera
                distanceThreshold: 50 // select entities within 50m metre radius of mainCamera
            }
        }
    }
}

属性文档

distanceThreshold : real

存储与目标实体的距离,超过该距离的实体将被过滤掉。

entity : Entity

保存用于比较距离的基准实体。

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