Qt3DRender::QProximityFilter Class

class Qt3DRender::QProximityFilter

选择与目标实体距离在阈值范围内的实体。更多

Header: #include <QProximityFilter>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
在 QML 中: ProximityFilter
继承: Qt3DRender::QFrameGraphNode
状态:已废弃

属性

公共功能

float distanceThreshold() const
Qt3DCore::QEntity *entity() const

公共插槽

void setDistanceThreshold(float distanceThreshold)
void setEntity(Qt3DCore::QEntity *entity)

信号

void distanceThresholdChanged(float distanceThreshold)
void entityChanged(Qt3DCore::QEntity *entity)

详细说明

Qt3DRender::QProximityFilter 可用于在实体与另一个实体的距离在给定阈值内时选择要渲染的实体。

属性文档

distanceThreshold : float

保存到目标实体的距离,超过此距离的实体将被过滤掉。

访问功能:

float distanceThreshold() const
void setDistanceThreshold(float distanceThreshold)

通知信号:

void distanceThresholdChanged(float distanceThreshold)

entity : Qt3DCore::QEntity*

用于比较距离的实体。

访问功能:

Qt3DCore::QEntity *entity() const
void setEntity(Qt3DCore::QEntity *entity)

通知信号:

void entityChanged(Qt3DCore::QEntity *entity)

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