public class Vector3d
extends java.lang.Object
Constructor | Description |
---|---|
Vector3d(double[] position) |
|
Vector3d(double x,
double y,
double z) |
|
Vector3d(float[] position) |
|
Vector3d(java.lang.Double[] position) |
|
Vector3d(Vector3d v) |
Modifier and Type | Method | Description |
---|---|---|
static double |
det(Vector3d v0,
Vector3d v1,
Vector3d v2) |
|
boolean |
equals(java.lang.Object obj) |
|
static Vector3d |
getBarycenter(Vector3d v0,
Vector3d v1,
double w0,
double w1) |
|
double[] |
getData() |
|
float[] |
getDataAsFloatArray() |
|
float[] |
getDataAsFloatArray(int size) |
|
double |
getNorm() |
|
double |
getNorm2() |
|
Vector3d |
getNormalized() |
|
double |
getX() |
|
double |
getY() |
|
double |
getZ() |
|
int |
hashCode() |
|
boolean |
isNearZero() |
Return true if this vector is (0, 0, 0).
|
boolean |
isZero() |
Return true if this vector is (0, 0, 0).
|
Vector3d |
minus(Vector3d v) |
|
Vector3d |
plus(Vector3d v) |
|
static Vector3d |
product(Vector3d v1,
Vector3d v2) |
Create a new vector cross-product of the given vectors.
|
double |
scalar(Vector3d v) |
|
Vector3d |
setX(double x) |
Create a new vector, copy of this one, with a new X value.
|
Vector3d |
setY(double y) |
Create a new vector, copy of this one, with a new Y value.
|
Vector3d |
setZ(double z) |
Create a new vector, copy of this one, with a new Z value.
|
Vector3d |
times(double d) |
|
java.lang.String |
toString() |
public Vector3d(Vector3d v)
public Vector3d(double x, double y, double z)
public Vector3d(float[] position)
public Vector3d(double[] position)
public Vector3d(java.lang.Double[] position)
public double getX()
public double getY()
public double getZ()
public java.lang.String toString()
toString
in class java.lang.Object
public double[] getData()
public float[] getDataAsFloatArray()
public float[] getDataAsFloatArray(int size)
public Vector3d times(double d)
public Vector3d getNormalized()
public double getNorm()
public double getNorm2()
public double scalar(Vector3d v)
public static Vector3d product(Vector3d v1, Vector3d v2)
v1
- the first given vector.v2
- the second given vector.public static final Vector3d getBarycenter(Vector3d v0, Vector3d v1, double w0, double w1)
public Vector3d setX(double x)
x
- the new X value.public Vector3d setY(double y)
y
- the new Y value.public Vector3d setZ(double z)
z
- the new Z value.public boolean isZero()
public boolean isNearZero()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object