public class JPoint3DD
extends java.lang.Object
Constructor and Description |
---|
JPoint3DD()
Creata the zero vector.
|
JPoint3DD(double x, double y, double z)
Create a 3D point or vector.
|
Modifier and Type | Method and Description |
---|---|
static JPoint3DD |
cross(JPoint3DD a, JPoint3DD b)
Return the cross product (a x b).
|
static double |
dot(JPoint3DD a, JPoint3DD b)
Return the dot product of two 3D vectors.
|
boolean |
equals(java.lang.Object obj) |
double |
getX()
Get x.
|
double |
getY()
Get y.
|
double |
getZ()
Get z.
|
int |
hashCode() |
boolean |
isZero()
Test if all three values x, y, and z are zero.
|
double |
length()
Return the length of the vector.
|
java.lang.String |
toString() |
public JPoint3DD()
public JPoint3DD(double x, double y, double z)
x
-y
-z
-public final double getX()
public final double getY()
public final double getZ()
public final double length()
public final boolean isZero()
public static final JPoint3DD cross(JPoint3DD a, JPoint3DD b)
a
-b
-public static final double dot(JPoint3DD a, JPoint3DD b)
a
-b
-public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object