|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--convexhull3d.SpatialVector
Bare bones 3D spatial vector.
Field Summary | |
double |
x
The x coordinate. |
double |
y
The y coordinate. |
double |
z
The z coordinate. |
Constructor Summary | |
SpatialVector()
Constructs and initializes a SpatialVector to (0,0,0). |
|
SpatialVector(double x,
double y,
double z)
Constructs and initializes a SpatialVector to (x,y,z). |
Method Summary | |
double |
dot(SpatialVector v)
Returns the dot product of this vector and vector v1 . |
double |
length()
Returns the length of this vector. |
double |
lengthSquared()
Returns the squared length of this vector. |
void |
normalize()
Normalizes this vector so that it has unit length. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public double x
public double y
public double z
Constructor Detail |
public SpatialVector()
public SpatialVector(double x, double y, double z)
x
- the x coordinatey
- the y coordinatez
- the z coordinateMethod Detail |
public void normalize()
public double length()
public double lengthSquared()
public double dot(SpatialVector v)
v1
.
v1
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |