public class Vector3D extends Object
| Constructor and Description |
|---|
Vector3D(Coordinate
|
Vector3D(Coordinate
|
Vector3D(double x, double y, double z)
|
| Modifier and Type | Method and Description |
|---|---|
static Vector3D |
create(Coordinate
Creates a vector from a
Coordinate.
|
static Vector3D |
create(double x, double y, double z)
Creates a new vector with given X and Y components.
|
static double |
dot(Coordinate
Computes the 3D dot-product of two
Coordinates.
|
static double |
dot(Coordinate
Computes the dot product of the 3D vectors AB and CD.
|
double |
dot(Vector3D
Computes the dot-product of two vectors
|
double |
getX()
|
double |
getY()
|
double |
getZ()
|
double |
length()
|
static double |
length(Coordinate
|
Vector3D |
normalize()
|
static Coordinate |
normalize(Coordinate
|
String |
toString()
Gets a string representation of this vector
|
public Vector3D(Coordinatev)
public Vector3D(Coordinatefrom, Coordinate to)
public Vector3D(double x,
double y,
double z)public static double dot(CoordinateA, Coordinate B, Coordinate C, Coordinate D)
A -
B -
C -
D -
public static Vector3Dcreate(double x, double y, double z)
x - the x component
y - the y component
z - the z component
public static Vector3Dcreate(Coordinate coord)
Coordinate.
coord - the Coordinate to copy
public static double dot(Coordinatev1, Coordinate v2)
Coordinates.
v1 - the first vector
v2 - the second vector
public double getX()
public double getY()
public double getZ()
public double dot(Vector3Dv)
v - a vector
public double length()
public static double length(Coordinatev)
public Vector3Dnormalize()
public static Coordinatenormalize(Coordinate v)