Methods
Quaternion 単位クォータニオンを表し、3D回転をエンコードするために使用されます。オイラー角とは異なり、クォータニオンはジンバルロックを回避し、滑らかに補間します。The Transform.rotation シーンノードのプロパティは a を保存します。 Quaternion.
コンポーネントは次のように保存されます。 (w, x, y, z) ここで w はスカラー部であり、 (x, y, z) はベクトル部を構成します。.
Methods: aspose.threed.utilities
Methods
| Methods | Methods |
|---|
Quaternion() | 単位クォータニオン (w=1, x=0, y=0, z=0) |
Quaternion(w, x, y, z) | 明示的コンポーネントコンストラクタ |
Methods
| Methods | Methods | Methods |
|---|
w | float | スカラー(実数)部 |
x | float | ベクトル x 成分 |
y | float | ベクトル y 成分 |
z | float | ベクトルの Z 成分 |
length | float | クォータニオンの大きさ |
静的ファクトリーメソッド
| Methods | 戻り値の型 | Methods |
|---|
Quaternion.from_euler_angle(pitch, yaw, roll) | Quaternion | ラジアン単位のオイラー角(ピッチ=X、ヨー=Y、ロール=Z)から構築します。また、 Vector3 最初の引数として |
Quaternion.from_angle_axis(angle, axis) | Quaternion | 角度(ラジアン)と Vector3 軸 |
Quaternion.from_rotation(orig, dest) | Quaternion | 方向から最短弧回転 orig 方向への dest |
Quaternion.interpolate(t, from_q, to_q) | Quaternion | SLERP 補間; t で [0, 1] |
Quaternion.slerp(t, v1, v2) | Quaternion | 別名 interpolate |
インスタンスメソッド
| Methods | 戻り値の型 | Methods |
|---|
normalize() | Quaternion | 単位長さのコピーを返す |
conjugate() | Quaternion | 共役を返す (w, -x, -y, -z) |
inverse() | Quaternion | 乗法的逆元を返す;例外を送出する ValueError 長さがゼロの場合 |
dot(q) | float | 別のクォータニオンとのドット積 |
concat(rhs) | Quaternion | ハミルトン積(2つの回転の合成) |
euler_angles() | Vector3 | オイラー角(ラジアン)を抽出し、として Vector3(roll, pitch, yaw) |
to_matrix(translation=None) | Matrix4 | 4×4回転行列に変換する;オプションで平行移動を埋め込む Vector3 |
to_angle_axis(angle, axis) | None | 角度(ラジアン)と軸に分解する;結果は単一要素リストに書き込まれる angle[0] そして axis[0] |
Methods
関連項目