Vector3
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Comparable, com.aspose.threed.Struct, java.io.Serializable
public final class Vector3 implements Comparable<Vector3>, Struct<Vector3>, Serializable
3 つの成分を持つベクトル。
コンストラクタ
| コンストラクタ | 説明 |
|---|---|
| Vector3(double x, double y, double z) | 新しいインスタンスを初期化します。Vector3 構造体。 |
| Vector3(FVector3 vec) | 新しいインスタンスを初期化します。Vector3 構造体。 |
| Vector3(double v) | 新しいインスタンスを初期化します。Vector3 構造体。 |
| Vector3(Vector4 vec4) | 新しいインスタンスを初期化します。Vector3 構造体。 |
| Vector3() |
フィールド
| フィールド | 説明 |
|---|---|
| x | x 成分。 |
| y | y 成分。 |
| z | z 成分。 |
メソッド
Vector3(double x, double y, double z)
public Vector3(double x, double y, double z)
新しいインスタンスを初期化します。Vector3 構造体。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| x | double | x 座標。 |
| y | double | y 座標。 |
| z | double | z 座標。 |
Vector3(FVector3 vec)
public Vector3(FVector3 vec)
新しいインスタンスを初期化します。Vector3 構造体。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| vec | FVector3 | x 座標。 |
Vector3(double v)
public Vector3(double v)
新しいインスタンスを初期化します。Vector3 構造体。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| v | double | V. |
Vector3(Vector4 vec4)
public Vector3(Vector4 vec4)
新しいインスタンスを初期化します。Vector3 構造体。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| vec4 | Vector4 | Vec4. |
Vector3()
public Vector3()
x
public double x
x 成分。
y
public double y
y 成分。
z
public double z
z 成分。
add(Vector3 lhs, Vector3 rhs)
public static Vector3 add(Vector3 lhs, Vector3 rhs)
- の演算子オーバーロード
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| lhs | Vector3 | 左ベクトル |
| rhs | Vector3 | 右ベクトル |
Returns: Vector3 - Result vector
angleBetween(Vector3 dir)
public double angleBetween(Vector3 dir)
2つの方向間の内部角度を計算します。2つの方向は正規化されていないベクトルでも構いません。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| dir | Vector3 | 比較対象の方向ベクトル |
Returns: double - ラジアン単位の内部角度
angleBetween(Vector3 dir, Vector3 up)
public double angleBetween(Vector3 dir, Vector3 up)
2つの方向間の内部角度を計算します。2つの方向は正規化されていないベクトルでも構いません。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| dir | Vector3 | 比較対象の方向ベクトル |
| up | Vector3 | 二つの方向が共有する平面の上ベクトル |
Returns: double - ラジアン単位の内部角度
clone()
public Vector3 clone()
現在のインスタンスをクローンする
Returns: Vector3
compareTo(Vector3 other)
public int compareTo(Vector3 other)
現在のベクトルを別のインスタンスと比較します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| other | Vector3 |
Returns: int
copyFrom(Vector3 src)
public void copyFrom(Vector3 src)
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| src | Vector3 |
cos()
public Vector3 cos()
各成分の余弦を計算します。
Returns: Vector3 - Calculated Vector3.
create(Vector3 v)
public static FVector3 create(Vector3 v)
Vector3 を FVector3 にキャストする明示的変換演算子
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| v | Vector3 |
Returns: FVector3
cross(Vector3 rhs)
public Vector3 cross(Vector3 rhs)
2つのベクトルの外積
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| rhs | Vector3 | 右側の値。 |
Returns: Vector3 - Cross product of two Vector3s.
div(Vector3 lhs, Vector3 rhs)
public static Vector3 div(Vector3 lhs, Vector3 rhs)
/ の演算子オーバーロード
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| lhs | Vector3 | 左ベクトル |
| rhs | Vector3 | 右ベクトル |
Returns: Vector3 - Result vector
div(Vector3 lhs, double rhs)
public static Vector3 div(Vector3 lhs, double rhs)
/ の演算子オーバーロード
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| lhs | Vector3 | 左ベクトル |
| rhs | double | 右側の double 値 |
Returns: Vector3 - Result vector
dot(Vector3 rhs)
public double dot(Vector3 rhs)
2つのベクトルのドット積を取得します
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| rhs | Vector3 | 右側の値。 |
Returns: double - 二つのベクトルのドット積。
equals(Object obj)
public boolean equals(Object obj)
2つの vector3 が等しいかチェックします
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| obj | java.lang.Object | 等価性をチェックするオブジェクト。 |
Returns: boolean - すべてのコンポーネントが完全に等しい場合は true。
get(int idx)
public double get(int idx)
インデックスでベクトルの成分を取得します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| idx | int |
Returns: double - インデックスによるベクトルの成分。
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getLength()
public double getLength()
このベクトルの長さを取得します。
Returns: double - このベクトルの長さ。
getLength2()
public double getLength2()
長さの二乗を取得します。
Returns: double - 長さの二乗。
getOne()
public static Vector3 getOne()
単位ベクトル (1, 1, 1) を取得します
Returns: Vector3 - unit vector (1, 1, 1)
getUnitX()
public static Vector3 getUnitX()
単位ベクトル (1, 0, 0) を取得します
Returns: Vector3 - unit vector (1, 0, 0)
getUnitY()
public static Vector3 getUnitY()
単位ベクトル (0, 1, 0) を取得します
Returns: Vector3 - unit vector (0, 1, 0)
getUnitZ()
public static Vector3 getUnitZ()
単位ベクトル (0, 0, 1) を取得します
Returns: Vector3 - unit vector (0, 0, 1)
getZero()
public static Vector3 getZero()
単位ベクトル (0, 0, 0) を取得します
Returns: Vector3 - unit vector (0, 0, 0)
hashCode()
public int hashCode()
Vector3 のハッシュコードを取得します
Returns: int - Vector3 のハッシュコード。
mul(Vector3 lhs, Vector3 rhs)
public static Vector3 mul(Vector3 lhs, Vector3 rhs)
* の演算子オーバーロード
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| lhs | Vector3 | 左ベクトル |
| rhs | Vector3 | 右ベクトル |
Returns: Vector3 - Result vector
mul(Vector3 lhs, double rhs)
public static Vector3 mul(Vector3 lhs, double rhs)
* の演算子オーバーロード
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| lhs | Vector3 | 左ベクトル |
| rhs | double | 右側の double 値 |
Returns: Vector3 - Result vector
mul(double lhs, Vector3 rhs)
public static Vector3 mul(double lhs, Vector3 rhs)
* の演算子オーバーロード
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| lhs | double | 左側のスカラー |
| rhs | Vector3 | 右ベクトル |
Returns: Vector3 - Result vector
negative(Vector3 v)
public static Vector3 negative(Vector3 v)
「-」の演算子オーバーロード
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| v | Vector3 | 原点ベクトル |
Returns: Vector3 - Result vector
normalize()
public Vector3 normalize()
このインスタンスを正規化します。
Returns: Vector3 - Normalized vector.
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
op_eq(Vector3 lhs, Vector3 rhs)
public static boolean op_eq(Vector3 lhs, Vector3 rhs)
Vector3 の等価演算子
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| lhs | Vector3 | 左側の値。 |
| rhs | Vector3 | 右側の値。 |
Returns: boolean - すべてのコンポーネントが完全に等しい場合は true。
op_ne(Vector3 lhs, Vector3 rhs)
public static boolean op_ne(Vector3 lhs, Vector3 rhs)
Vector3 の不等価演算子
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| lhs | Vector3 | 左側の値。 |
| rhs | Vector3 | 右側の値。 |
Returns: boolean - 2 つのベクトルが等しくない場合は true。
set(double newX, double newY, double newZ)
public void set(double newX, double newY, double newZ)
x/y/z コンポーネントを一度の呼び出しで設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| newX | double | x 成分。 |
| newY | double | y 成分。 |
| newZ | double | z 成分。 |
set(int idx, double value)
public void set(int idx, double value)
インデックスでベクトルのコンポーネントを設定します。
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| idx | int | |
| 値 | double | 新しい値 |
sin()
public Vector3 sin()
各コンポーネントの正弦を計算します
Returns: Vector3 - Calculated Vector3.
sub(Vector3 lhs, Vector3 rhs)
public static Vector3 sub(Vector3 lhs, Vector3 rhs)
「-」(マイナス) の演算子オーバーロード
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| lhs | Vector3 | 左ベクトル |
| rhs | Vector3 | 右ベクトル |
Returns: Vector3 - Result vector
toString()
public String toString()
現在の Vector3 を表す java.lang.String を返します。
Returns: java.lang.String - 現在の Vector3 を表す java.lang.String。
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| パラメーター | 型 | 説明 |
|---|---|---|
| arg0 | long | |
| arg1 | int |