model
Class Vector3d
java.lang.Object
model.Vector3d
public class Vector3d
- extends java.lang.Object
A 3d vector used to calculate cross-products for normal vectors.
|
Field Summary |
static int |
SIZE
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SIZE
public static final int SIZE
- See Also:
- Constant Field Values
Vector3d
public Vector3d()
Vector3d
public Vector3d(double[] v)
Vector3d
public Vector3d(Vector3d v)
setVector
public void setVector(double[] v)
setVector
public void setVector(Vector3d v)
getVector
public double[] getVector()
getNormalized
public double[] getNormalized()
crossProduct
public static Vector3d crossProduct(double[] v1,
double[] v2)
- Returns the cross product of the specified vectors.
- Parameters:
v1 - first vectorv2 - second vector
- Returns:
- cross product
normalize
public double[] normalize()
- Returns the normalization of this vector.
- Returns:
- this vector, normalized