パブリック クラス
Vector3
3 つの浮動小数点数を持つ Vector。
フィールド
public float | x | |
public float | y | |
public float | z |
パブリック コンストラクタ
Vector3()
Vector3 を作成し、すべての値にゼロを割り当てる
|
|
Vector3(float x、float y、float z)
Vector3 を作成し、各値を割り当てる
|
|
パブリック メソッド
static Vector3 | |
static float | |
static Vector3 |
back()
(0, 0, 1) に設定された Vector3 を取得します
|
static Vector3 | |
static float | |
static Vector3 |
down()
(0, -1, 0) に設定された Vector3 を取得します
|
static ブール値 | |
ブール値 | |
static Vector3 |
forward()
(0, 0, -1) に設定された Vector3 を取得します
|
static Vector3 |
left()
(-1、0、0)に設定された Vector3 を取得します。
|
浮動小数点数 |
length()
|
浮動小数点数 | |
static Vector3 | |
static Vector3 | |
static Vector3 | |
Vector3 |
negated()
Vector3 を否定する
|
Vector3 |
正規化()
Vector3 を単位の長さにスケーリングします
|
static Vector3 |
one()
すべての値を 1 に設定した Vector3 を取得します
|
static Vector3 |
right()
(1, 0, 0) に設定された Vector3 を取得します
|
Vector3 | |
void | |
void |
set(float vx、float vy、float vz)
それぞれの値を設定
|
static Vector3 | |
文字列 |
toString()
|
static Vector3 |
up()
(0, 1, 0) に設定された Vector3 を取得します
|
static Vector3 |
zero()
すべての値が 0 に設定された Vector3 を取得します
|
継承されるメソッド
フィールド
public-float x
public-float y
public-float z
パブリック コンストラクタ
public Vector3 ()
Vector3 を作成し、すべての値にゼロを割り当てる
public Vector3 (float x、float y、float z)
Vector3 を作成し、各値を割り当てる
パラメータ
x | |
---|---|
y | |
z |
パブリック メソッド
public static Vector3 add (Vector3 lhs, Vector3 rhs)
2 つの Vector3 を追加する
パラメータ
Lhs | |
---|---|
RHH |
戻り値
- Vector3 を組み合わせた場合
public static float angleBetweenVectors (Vector3 a, Vector3 b)
2 つのベクトル間の最短角度を度数で返します。結果は、180 度を超えることはありません。
パラメータ
a | |
---|---|
b |
public static Vector3 cross (Vector3 lhs, Vector3 rhs)
2 つの Vector3 のクロス積を取得
パラメータ
Lhs | |
---|---|
RHH |
戻り値
- Vector3 に垂直な Vector3
public static float dot (Vector3 lhs, Vector3 rhs)
2 つの Vector3 のドット積を取得する
パラメータ
Lhs | |
---|---|
RHH |
戻り値
- Vector3 のスカラー積
public static boolean equals (Vector3 lhs, Vector3 rhs)
各コンポーネントが許容範囲内で等しい場合、2 つの Vector3 が等しいことを比較します。
パラメータ
Lhs | |
---|---|
RHH |
public boolean equals (Object other)
他のオブジェクトが Vector3 であり、各コンポーネントが許容範囲内で等しい場合は true を返します。
パラメータ
その他 |
---|
public float length ()
public float lengthSquared ()
public static Vector3 lerp (Vector3 a、Vector3 b、float t)
a と b との間の線形補間を行います。
パラメータ
a | 開始値 |
---|---|
b | 終了値 |
t | 2 つの浮動小数点数の間の比率。 |
戻り値
- 2 つの浮動小数点数間で補間される値
public static Vector3 max (Vector3 lhs、Vector3 rhs)
各値を要素ごとに最大 2 つの Vector3' 値に設定して、Vector3 を取得します。
パラメータ
Lhs | |
---|---|
RHH |
public static Vector3 min (Vector3 lhs、Vector3 rhs)
各値を要素単位の 2 つ以上の Vector3' 値に設定して、Vector3 を取得します
パラメータ
Lhs | |
---|---|
RHH |
public void set (float vx、float vy、float vz)
それぞれの値を設定
パラメータ
vx | |
---|---|
vy | |
VZ |
public static Vector3 減算 (Vector3 lhs, Vector3 rhs)
2 つの Vector3 を引きます
パラメータ
Lhs | |
---|---|
RHH |
戻り値
- Vector3 を組み合わせた場合