在本页

VectorDirection3D QML Type

用于指定朝向目标方向的方向。更多

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

Direction3D

属性

详细说明

该元素设置粒子朝目标方向矢量的发射速度。方向向量的长度用作速度大小。

例如,要在 x: 50...150, y:-20..20, z: 0:

ParticleEmitter3D {
    ...
    velocity: VectorDirection3D {
        direction: Qt.vector3d(100, 0, 0)
        directionVariation: Qt.vector3d(50, 20, 0)
    }
}

属性文档

direction : vector3d

该属性定义粒子目标的方向。

默认值为(0, 100, 0) (Y 轴向上)。

另请参阅 directionVariation

directionVariation : vector3d

该属性定义粒子目标的方向变化。

默认值为(0, 0, 0) (无变化)。

另请参阅 direction

normalized : bool

该属性定义了应用变化后是否应将方向归一化。设为 false 时,变化会影响粒子速度的大小。设置为 true 时,变化会影响方向,但幅度由原始方向长度决定。

默认值为false

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