public class Vector3D extends Object
| Constructor and Description |
|---|
Vector3D(double x,
double y,
double z) |
Vector3D(Point v) |
Vector3D(Point from,
Point to) |
| Modifier and Type | Method and Description |
|---|---|
static Vector3D |
create(double x,
double y,
double z)
Creates a new vector with given X and Y components.
|
static Vector3D |
create(Point coord)
Creates a vector from a
Coordinates. |
static double |
dot(Point v1,
Point v2)
Computes the 3D dot-product of two
Coordinatess. |
static double |
dot(Point A,
Point B,
Point C,
Point D)
Computes the dot product of the 3D vectors AB and CD.
|
double |
dot(Vector3D v)
Computes the dot-product of two vectors
|
double |
getX() |
double |
getY() |
double |
getZ() |
double |
length() |
static double |
length(Point v) |
Vector3D |
normalize() |
static Point |
normalize(Point v) |
String |
toString()
Gets a string representation of this vector
|
public Vector3D(double x,
double y,
double z)
public Vector3D(Point v)
public static Vector3D create(double x, double y, double z)
x - the x componenty - the y componentz - the z componentpublic static Vector3D create(Point coord)
Coordinates.coord - the Point to copypublic static double dot(Point v1, Point v2)
Coordinatess.v1 - the first vectorv2 - the second vectorpublic static double dot(Point A, Point B, Point C, Point D)
A - B - C - D - public static double length(Point v)
public double dot(Vector3D v)
v - a vectorpublic double getX()
public double getY()
public double getZ()
public double length()
public Vector3D normalize()
Copyright © 2015 Revolution Systems Inc.. All rights reserved.