Provides utility functions for quaternion. 更多...
导入语句: | import QtQuick3D |
Since: | Qt 5.15 |
Quaternion
is a global object with utility functions.
它不可实例化;要使用它,调用成员来自全局
Quaternion
对象直接。例如:
Node { rotation: Quaternion.fromAxisAndAngle(Qt.vector3d(1, 0, 0), 45) }
quaternion fromAxesAndAngles ( vector3d axis1 , real angle1 , vector3d axis2 , real angle2 , vector3d axis3 , real angle3 ) |
Creates a quaternion from axis1 , angle1 , axis2 , angle2 , axis3 ,和 angle3 . Returns the resulting quaternion.
quaternion fromAxesAndAngles ( vector3d axis1 , real angle1 , vector3d axis2 , real angle2 ) |
Creates a quaternion from axis1 , angle1 , axis2 ,和 angle2 . Returns the resulting quaternion.
quaternion fromAxisAndAngle ( real x , real y , real z , real angle ) |
Creates a quaternion from x , y , z ,和 angle . Returns the resulting quaternion.
quaternion fromAxisAndAngle ( vector3d axis , real angle ) |
Creates a quaternion from axis and angle . Returns the resulting quaternion.
quaternion fromEulerAngles ( real x , real y , real z ) |
Creates a quaternion from x , y ,和 z . Returns the resulting quaternion.
quaternion fromEulerAngles ( vector3d eulerAngles ) |
Creates a quaternion from eulerAngles . Returns the resulting quaternion.
quaternion lookAt ( vector3d sourcePosition , vector3d targetPosition , vector3d forwardDirection , vector3d upDirection ) |
Creates a quaternion from sourcePosition , targetPosition , forwardDirection ,和 upDirection . This is used for getting a rotation value for pointing at a particular target, and can be used to point a camera at a position in a scene.
forwardDirection
默认为
Qt.vector3d(0, 0, -1)
upDirection
默认为
Qt.vector3d(0, 1, 0)
Returns the resulting quaternion.