Utilities
Class Vector3D
java.lang.Object
Utilities.Vector3D
public class Vector3D
- extends java.lang.Object
- Author:
- David
|
Field Summary |
double |
x
|
double |
y
|
double |
z
|
|
Constructor Summary |
Vector3D(double newX,
double newY,
double newZ)
Creates a new instance of 3DVector |
Vector3D(Vertex vertex)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x
public double x
y
public double y
z
public double z
Vector3D
public Vector3D(double newX,
double newY,
double newZ)
- Creates a new instance of 3DVector
Vector3D
public Vector3D(Vertex vertex)
Normalise
public void Normalise()
DotProduct
public double DotProduct(Vertex vertex)
DotProduct
public double DotProduct(Vector3D vector)
DotProduct
public double DotProduct(double x,
double y,
double z)
setPoint
public void setPoint(double newX,
double newY,
double newZ)
debug
public void debug()
add
public void add(Vector3D vector)
divide
public void divide(byte number)
getFaceNormal
public static Vector3D getFaceNormal(Vertex v1,
Vertex v2,
Vertex v3)