ParticleSystem3DLogging QML Type

提供粒子系统的信息。更多

Import Statement: import QtQuick3D.Particles3D
Since: Qt 6.2
Inherits:

QtObject

属性

详细描述

ParticleSystem3DLogging 类型提供粒子系统统计信息。该元素不能直接创建,但可以从ParticleSystem3D 中获取。

属性文档

loggingInterval : int

该属性以毫秒为单位定义日志数据的更新频率。较长的更新时间会提高timetimeAverage 的准确性,而较短的更新时间则会使数据更加及时。

默认值为1000


particlesMax : int [read-only]

该属性记录了系统中粒子的最大数量。最大数量是系统粒子maxAmount 属性的总和。


particlesUsed : int [read-only]

该属性表示该系统当前使用的粒子数量。在粒子系统动画的某个阶段,该值应接近particlesMax 。如果该值小得多,可考虑减小maxAmount 值。如果该值达到particlesMax ,则粒子得到了有效使用,但这也可能意味着粒子在到达其lifeSpan 的终点之前就已被重复使用。在这种情况下,可考虑增加maxAmount 值。


time : real [read-only]

该属性表示每帧中粒子发射和动画所用的时间(毫秒)。


timeAverage : real [read-only]

该属性表示每帧中粒子发射和动画的平均时间(毫秒)。平均值是根据过去最多 100 次日志更新的中间 50% 计算得出的。因此,当loggingInterval 为 1000 时,这代表过去 100 秒内time 的平均值。这可用于衡量当前粒子系统的性能。


timeDeviation : real [read-only, since 6.3]

该属性表示平均时间的偏差,单位为毫秒。该值是中间 50%结果的最大值和最小值之差,也称为四分位间范围(IQR)。偏差越大,表示时间波动越大,因此timeAverage 的准确性越低。

该属性在 Qt 6.3 中引入。


updates : int [read-only]

该属性记录了自上次记录以来粒子系统的更新量。当loggingInterval 为 1000(默认值)时,可以认为该值与 fps 匹配。


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