|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--com.j_phone.util.Vector2D
Vector2Dクラスは、2次元ベクトル演算機能を提供します。Vector2Dのインスタンスは、ベクトルの各要素をFixedPointのインスタンスで保持します。下記の機能を提供します。
コンストラクタの概要 | |
Vector2D()
Vector2Dコンストラクタ。 |
|
Vector2D(FixedPoint x,
FixedPoint y)
Vector2Dコンストラクタ |
|
Vector2D(int x,
int y)
Vector2Dコンストラクタ |
メソッドの概要 | |
void |
add(int x,
int y)
加算します。 |
void |
add(Vector2D vector)
加算します。 |
Vector2D |
clone()
コピーします。 |
FixedPoint |
getX()
X軸方向を取得します。 |
FixedPoint |
getY()
Y軸方向を取得します。 |
static FixedPoint |
innerProduct(Vector2D v1,
Vector2D v2)
内積を計算します。 |
void |
normalize()
正規化します。 |
static FixedPoint |
outerProduct(Vector2D v1,
Vector2D v2)
外積を計算します。 |
void |
setValue(FixedPoint x,
FixedPoint y)
新しい値を設定します。 |
void |
setValue(int x,
int y)
新しい値を設定します。 |
void |
subtract(int x,
int y)
減算します。 |
void |
subtract(Vector2D vector)
減算します。 |
クラス java.lang.Object から継承したメソッド |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public Vector2D(FixedPoint x, FixedPoint y)
x
- X軸方向y
- Y軸方向public Vector2D(int x, int y)
x
- X軸方向y
- Y軸方向public Vector2D()
メソッドの詳細 |
public void add(Vector2D vector)
vector
- 加算するベクトルNullPointerException
- vectorが null の場合に発生するpublic void add(int x, int y)
x
- 加算するベクトルのX軸方向y
- 加算するベクトルのy軸方向public void subtract(Vector2D vector)
vector
- 減算するベクトルNullPointerException
- vectorが null の場合に発生するpublic void subtract(int x, int y)
x
- 減算するベクトルのX軸方向y
- 減算するベクトルのy軸方向public void normalize()
public static FixedPoint innerProduct(Vector2D v1, Vector2D v2)
v1
- ベクトル1v2
- ベクトル2NullPointerException
- v1 または v2 が null の場合に発生するpublic static FixedPoint outerProduct(Vector2D v1, Vector2D v2)
v1
- ベクトル1v2
- ベクトル2NullPointerException
- v1 または v2 が null の場合に発生するpublic void setValue(int x, int y)
x
- ベクトルのX軸方向y
- ベクトルのy軸方向public void setValue(FixedPoint x, FixedPoint y)
x
- ベクトルのX軸方向y
- ベクトルのy軸方向NullPointerException
- x または y が null の場合に発生するpublic FixedPoint getX()
public FixedPoint getY()
public Vector2D clone()
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |