TargetDirection3D QML Type
用于指定朝向目标位置的方向。更多
Import Statement: | import QtQuick3D.Particles3D |
Since: | Qt 6.2 |
Inherits: |
属性
- magnitude : real
- magnitudeVariation : real
- normalized : bool
- position : vector3d
- positionVariation : vector3d
详细说明
该元素用于设置向目标位置发射粒子的速度。
例如,以 10...20 之间的随机幅度向位置(100, 0, 0)发射粒子:
ParticleEmitter3D { ... velocity: TargetDirection3D { position: Qt.vector3d(100, 0, 0) normalized: true magnitude: 15.0 magnitudeVariation: 5.0 } }
属性文档
magnitude : real |
该属性定义了每秒位置变化的幅度。负值加速度与position 相反。当normalized 为假时,该值将与目标位置的距离相乘。
默认值为1.0
。
另请参阅 magnitudeVariation 。
magnitudeVariation : real |
normalized : bool |
该属性定义了到position 的距离是否应视为归一化。设置为假时,到position 的距离会影响粒子速度的大小。设置为 true 时,距离被归一化,速度大小只来自magnitude 和magnitudeVariation 。
默认值为false
。
另请参阅 magnitude 和magnitudeVariation 。
position : vector3d |
© 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.