|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object VectorXYZ
public class VectorXYZ
Field Summary | |
---|---|
static VectorXYZ |
NULL_VECTOR
|
double |
x
|
static VectorXYZ |
X_UNIT
|
double |
y
|
static VectorXYZ |
Y_UNIT
|
double |
z
|
static VectorXYZ |
Z_UNIT
|
Constructor Summary | |
---|---|
VectorXYZ(double x2,
double y2,
double z2)
|
Method Summary | |
---|---|
VectorXYZ |
add(double x,
double y,
double z)
|
VectorXYZ |
add(VectorXYZ other)
|
VectorXYZ |
add(VectorXZ other)
|
static List<VectorXYZ> |
addYList(List<VectorXYZ> list,
double addY)
|
double |
angleTo(VectorXYZ other)
calculates the angle between this vector and other, but only if both are normalized! |
VectorXYZ |
cross(VectorXYZ other)
|
VectorXYZ |
crossNormalized(VectorXYZ other)
same result as calling normalize() after
cross(VectorXYZ) , but avoids creating a temporary vector |
double |
distanceTo(VectorXYZ other)
|
double |
distanceToSquared(VectorXYZ other)
|
double |
distanceToXZ(VectorXYZ other)
|
double |
distanceToXZ(VectorXZ other)
|
double |
dot(VectorXYZ other)
|
boolean |
equals(Object obj)
|
double |
getX()
|
double |
getY()
|
double |
getZ()
|
int |
hashCode()
|
VectorXYZ |
invert()
|
double |
length()
|
double |
lengthSquared()
|
VectorXYZ |
mult(double scalar)
|
VectorXYZ |
normalize()
|
VectorXYZ |
rotateVec(double angleRad,
VectorXYZ n)
returns the result of rotating this vector around the given normalized vector n |
VectorXYZ |
rotateX(double angleRad)
returns the result of rotating this vector around the x axis |
VectorXYZ |
rotateY(double angleRad)
returns the result of rotating this vector around the y axis |
VectorXYZ |
rotateZ(double angleRad)
returns the result of rotating this vector around the z axis |
VectorXYZ |
subtract(VectorXYZ other)
|
VectorXYZ |
subtract(VectorXZ other)
|
String |
toString()
|
VectorXYZ |
x(double x)
|
static VectorXYZ |
xyz(VectorXYZ vector3D)
creates a VectorXYZ for any Vector3D object. |
VectorXZ |
xz()
|
VectorXYZ |
y(double y)
|
VectorXYZ |
z(double z)
|
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final double x
public final double y
public final double z
public static final VectorXYZ NULL_VECTOR
public static final VectorXYZ X_UNIT
public static final VectorXYZ Y_UNIT
public static final VectorXYZ Z_UNIT
Constructor Detail |
---|
public VectorXYZ(double x2, double y2, double z2)
Method Detail |
---|
public double getX()
getX
in interface Vector3D
public double getY()
getY
in interface Vector3D
public double getZ()
getZ
in interface Vector3D
public double length()
public double lengthSquared()
public VectorXYZ normalize()
public VectorXYZ add(VectorXYZ other)
public VectorXYZ add(VectorXZ other)
public VectorXYZ add(double x, double y, double z)
public VectorXYZ subtract(VectorXYZ other)
public VectorXYZ subtract(VectorXZ other)
public VectorXYZ cross(VectorXYZ other)
public VectorXYZ crossNormalized(VectorXYZ other)
normalize()
after
cross(VectorXYZ)
, but avoids creating a temporary vector
public double dot(VectorXYZ other)
public VectorXYZ mult(double scalar)
public String toString()
toString
in class Object
public VectorXYZ rotateX(double angleRad)
angleRad
- angle in radianspublic VectorXYZ rotateY(double angleRad)
angleRad
- angle in radianspublic VectorXYZ rotateZ(double angleRad)
angleRad
- angle in radianspublic VectorXYZ rotateVec(double angleRad, VectorXYZ n)
angleRad
- angle in radiansn
- normalized vectorpublic double angleTo(VectorXYZ other)
public double distanceTo(VectorXYZ other)
public double distanceToSquared(VectorXYZ other)
public double distanceToXZ(VectorXZ other)
public double distanceToXZ(VectorXYZ other)
public VectorXZ xz()
public VectorXYZ x(double x)
public VectorXYZ y(double y)
public VectorXYZ z(double z)
public VectorXYZ invert()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public static VectorXYZ xyz(VectorXYZ vector3D)
public static List<VectorXYZ> addYList(List<VectorXYZ> list, double addY)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |