Quaternion QML Type

四元数に関するユーティリティ関数を提供する。詳細...

Import Statement: import QtQuick3D

メソッド

  • quaternion fromAxesAndAngles(vector3d axis1, real angle1, vector3d axis2, real angle2)
  • quaternion fromAxesAndAngles(vector3d axis1, real angle1, vector3d axis2, real angle2, vector3d axis3, real angle3)
  • quaternion fromAxisAndAngle(vector3d axis, real angle)
  • quaternion fromAxisAndAngle(real x, real y, real z, real angle)
  • quaternion fromEulerAngles(vector3d eulerAngles)
  • quaternion fromEulerAngles(real x, real y, real z)
  • quaternion lookAt(vector3d sourcePosition, vector3d targetPosition, vector3d forwardDirection, vector3d upDirection)

詳細説明

Quaternion はユーティリティ関数を持つグローバルオブジェクトです。

インスタンス化できません。使用するには、グローバルなQuaternion オブジェクトのメンバを直接呼び出します。例えば

Node {
    rotation: Quaternion.fromAxisAndAngle(Qt.vector3d(1, 0, 0), 45)
}

メソッド・ドキュメント

quaternion fromAxesAndAngles(vector3d axis1, real angle1, vector3d axis2, real angle2)

axis1,angle1,axis2, およびangle2 からクォータニオンを作成します。結果のクォータニオンを返します。


quaternion fromAxesAndAngles(vector3d axis1, real angle1, vector3d axis2, real angle2, vector3d axis3, real angle3)

axis1,angle1,axis2,angle2,axis3, およびangle3 からクォータニオンを作成します。結果のクォータニオンを返します。


quaternion fromAxisAndAngle(vector3d axis, real angle)

axisangle からクォータニオンを作成します。結果のクォータニオンを返します。


quaternion fromAxisAndAngle(real x, real y, real z, real angle)

x,y,z, およびangle から四元数を作成します。結果のクォータニオンを返します。


quaternion fromEulerAngles(vector3d eulerAngles)

eulerAngles からクォータニオンを作成します。結果のクォータニオンを返します。


quaternion fromEulerAngles(real x, real y, real z)

x,y, およびz から四元数を作成します。結果のクォータニオンを返します。


quaternion lookAt(vector3d sourcePosition, vector3d targetPosition, vector3d forwardDirection, vector3d upDirection)

sourcePosition,targetPosition,forwardDirection, およびupDirection からクォータニオンを作成します。これは、特定のターゲットを指すための回転値を取得するために使用され、シーン内の位置にカメラを向けるために使用することができます。

forwardDirection デフォルトは です。Qt.vector3d(0, 0, -1) upDirection Qt.vector3d(0, 1, 0)

結果の四元数を返します。


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