Example
Quaternion 回転に使用される単位クォータニオンを表します。ジンバルロックを回避し、姿勢間のスムーズな補間を提供します。The Transform class は回転を a として格納します。 Quaternion 経由でアクセス可能 getRotation() / setRotation().
Example: com.aspose.threed
Example
| Example | Example |
|---|
Quaternion() | 単位クォータニオン (1, 0, 0, 0) |
Quaternion(double w, double x, double y, double z) | 4つの成分から構築 |
公開フィールド
Quaternion 使用します 公開フィールド コンポーネントアクセス用(getter/setter メソッドではなく):
| Example | Example | Example | Example |
|---|
w | double | q.w | スカラー(実数)部 |
x | double | q.x | ベクトル部の X 成分 |
y | double | q.y | ベクトル部の Y 成分 |
z | double | q.z | ベクトル部分の Z 成分 |
計算プロパティ
| Example | Example | Example | Example |
|---|
length | double | getLength() | クォータニオンの大きさ(次のようであるはずです 1.0 単位クォータニオンの場合) |
静的フィールド
| Example | Example | Example |
|---|
IDENTITY | Quaternion | 恒等クォータニオン (1, 0, 0, 0) – 回転なし |
静的メソッド
| Example | 戻り値の型 | Example |
|---|
Quaternion.fromEuler(double x, double y, double z) | Quaternion | オイラー角(度)からクォータニオンを作成する |
Quaternion.fromAngleAxis(double angle, Vector3 axis) | Quaternion | 角度(ラジアン)と回転軸からクォータニオンを作成する |
インスタンスメソッド
| Example | 戻り値の型 | Example |
|---|
normalize() | Quaternion | 単位長さのコピーを返す |
conjugate() | Quaternion | 共役(ベクトル部分が符号反転したもの)を返す |
inverse() | Quaternion | 乗法的逆元を返します |
toEulerAngles() | Vector3 | 度単位のオイラー角に変換します |
toMatrix() | Matrix4 | 4x4回転行列に変換します |
Example
参照