geometry
public class J3Vector extends java.lang.Object implements java.io.Serializable
This class provides a base to represent/handle three vector.
Constructor and Description |
---|
J3Vector()
Constructor.
|
J3Vector(double x,
double y,
double z)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static J3Vector |
add(J3Vector a,
J3Vector b)
add vectors a+b
|
void |
decrement(J3Vector a,
J3Vector b)
decrement vectors a-=b
|
static double |
getAngleInDegree(J3Vector a,
J3Vector b)
calculate the angle [deg] between two vectors.
|
static double |
getAngleInRadian(J3Vector a,
J3Vector b)
calculate the angle [rad] between two vectors.
|
static J3Vector |
getCrossProduct(J3Vector a,
J3Vector b)
calculate the cross Products axb
|
static double |
getDotProduct(J3Vector a,
J3Vector b)
calculate the dot-product
|
double |
getLength()
get the vector length
|
double |
getX()
get x component
|
double |
getY()
get y component
|
double |
getZ()
get z component
|
void |
increment(J3Vector a,
J3Vector b)
increment vectors a+=b
|
static J3Vector |
multipleFactor(double f,
J3Vector a)
calculate scalor x vector fxa
|
void |
putVector(J3Vector a)
put a new vector a = b
|
void |
setAll(double x,
double y,
double z)
set all xyz components
|
void |
setLength()
calculate the vector length to set
|
void |
setX(double x)
set x component
|
void |
setY(double y)
set y component
|
void |
setZ(double z)
set z component
|
static J3Vector |
subtract(J3Vector a,
J3Vector b)
sabtract vectors a-b
|
public J3Vector(double x, double y, double z)
public J3Vector()
public void setX(double x)
public void setY(double y)
public void setZ(double z)
public void setAll(double x, double y, double z)
public void putVector(J3Vector a)
public double getX()
public double getY()
public double getZ()
public void setLength()
public double getLength()
public static double getAngleInRadian(J3Vector a, J3Vector b)
public static double getAngleInDegree(J3Vector a, J3Vector b)
public static J3Vector getCrossProduct(J3Vector a, J3Vector b)