SubtreeEnabler QML Type

启用或禁用帧图节点的整个子树。更多

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

FrameGraphNode

Status: Deprecated

属性

方法

详细说明

虽然 FrameGraphNodes 可以通过enabled 属性单独启用或禁用,但当需要打开或关闭整个路径时,这可能会变得繁琐。SubtreeEnabler 是一个方便的节点,它允许通过单个开关控制所有子节点,从而使这种用例变得简单。

例如,下面的简化框架图包含一个用于调试渲染的子树,只有在调试时才能轻松启用。

SubtreeEnabler 默认已启用。

属性文档

enablement : enumeration

控制子树的启用是持久的还是短暂的。

常量说明
Persistentenabled 的值为持久。这是默认值。
SingleShotenabled 的值将持续一帧,然后重置为 false。例如,这可用于绘制到 FBO 的子树,以便仅在场景的相关部分发生变化时更新 FBO。

方法文档

void requestUpdate()

请求启用子树。

这是一种方便的方法,旨在与SingleShot 启用一起使用。


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