jp.digitalmuseum.utils
クラス Vector2D
java.lang.Object
jp.digitalmuseum.utils.Vector2D
-
すべての実装されたインタフェース:
- java.io.Serializable
-
直系の既知のサブクラス:
- Position
-
public class Vector2D
- extends java.lang.Object
- implements java.io.Serializable
2D vector in the world coordinate.
- 作成者:
- Jun KATO
- 関連項目:
- 直列化された形式
フィールドの概要 |
protected double |
x
|
protected double |
y
|
メソッドの概要 |
void |
add(double x,
double y)
|
void |
add(Vector2D v)
|
static Vector2D |
add(Vector2D v1,
Vector2D v2)
|
void |
addOut(double x,
double y,
Vector2D out)
|
void |
addOut(Vector2D v,
Vector2D out)
|
static void |
addOut(Vector2D v1,
Vector2D v2,
Vector2D out)
|
double |
cross(double x,
double y)
|
double |
cross(Vector2D v)
|
static double |
cross(Vector2D v1,
Vector2D v2)
|
void |
div(double l)
|
void |
divOut(double l,
Vector2D out)
|
double |
dot(double x,
double y)
|
double |
dot(Vector2D v)
|
static double |
dot(Vector2D v1,
Vector2D v2)
|
double |
getNorm()
|
double |
getNormSq()
|
double |
getRelativeDirection(double x,
double y)
|
double |
getRelativeDirection(Vector2D v2)
|
double |
getX()
|
double |
getY()
|
void |
mul(double l)
|
void |
mulOut(double l,
Vector2D out)
|
void |
normalize()
|
void |
set(double x,
double y)
|
void |
set(Vector2D p)
|
void |
setX(double x)
|
void |
setY(double y)
|
void |
sub(double x,
double y)
|
void |
sub(Vector2D v)
|
static Vector2D |
sub(Vector2D v1,
Vector2D v2)
|
void |
subOut(double x,
double y,
Vector2D out)
|
void |
subOut(Vector2D v,
Vector2D out)
|
static void |
subOut(Vector2D v1,
Vector2D v2,
Vector2D out)
|
java.lang.String |
toString()
|
クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
x
protected double x
y
protected double y
Vector2D
public Vector2D()
Vector2D
public Vector2D(double x,
double y)
Vector2D
public Vector2D(Vector2D v)
set
public void set(double x,
double y)
set
public void set(Vector2D p)
setX
public void setX(double x)
getX
public double getX()
setY
public void setY(double y)
getY
public double getY()
getNorm
public double getNorm()
getNormSq
public double getNormSq()
getRelativeDirection
public double getRelativeDirection(Vector2D v2)
getRelativeDirection
public double getRelativeDirection(double x,
double y)
add
public static Vector2D add(Vector2D v1,
Vector2D v2)
addOut
public static void addOut(Vector2D v1,
Vector2D v2,
Vector2D out)
add
public void add(Vector2D v)
add
public void add(double x,
double y)
addOut
public void addOut(Vector2D v,
Vector2D out)
addOut
public void addOut(double x,
double y,
Vector2D out)
sub
public static Vector2D sub(Vector2D v1,
Vector2D v2)
subOut
public static void subOut(Vector2D v1,
Vector2D v2,
Vector2D out)
sub
public void sub(Vector2D v)
sub
public void sub(double x,
double y)
subOut
public void subOut(Vector2D v,
Vector2D out)
subOut
public void subOut(double x,
double y,
Vector2D out)
mul
public void mul(double l)
mulOut
public void mulOut(double l,
Vector2D out)
div
public void div(double l)
divOut
public void divOut(double l,
Vector2D out)
dot
public static double dot(Vector2D v1,
Vector2D v2)
dot
public double dot(Vector2D v)
dot
public double dot(double x,
double y)
cross
public static double cross(Vector2D v1,
Vector2D v2)
cross
public double cross(Vector2D v)
cross
public double cross(double x,
double y)
normalize
public void normalize()
toString
public java.lang.String toString()
- オーバーライド:
- クラス
java.lang.Object
内の toString
Copyright by Jun KATO (arc@dmz) at https://mr.digitalmuseum.jp/