public final class Point3D
extends java.lang.Object
Constructor and Description |
---|
Point3D()
Creates a point at the origin (0,0,0).
|
Point3D(double[] xyz)
Creates a new
Point3D at the position {x,y,z}. |
Point3D(double xVal,
double yVal,
double zVal)
Creates a point at position (xVal, yVal, zVal).
|
Point3D(Point3D point)
Creates a new
Point3D that is a copy of this one. |
Modifier and Type | Method and Description |
---|---|
Point3D |
displace(Vector3D v) |
double |
distance(Point3D p) |
boolean |
equals(java.lang.Object o) |
double |
getX() |
double |
getY() |
double |
getZ() |
int |
hashCode() |
java.lang.String |
toString() |
Point3D |
transform(RealMatrix aff)
Transform a point by a 4D Affine matrix.
|
public Point3D()
public Point3D(double xVal, double yVal, double zVal)
public Point3D(Point3D point)
Point3D
that is a copy of this one.public Point3D(double[] xyz)
Point3D
at the position {x,y,z}.xyz
- a double array of size 3 containing the x, y and z
positions, in that orderpublic double getX()
public double getY()
public double getZ()
public Point3D displace(Vector3D v)
public double distance(Point3D p)
public Point3D transform(RealMatrix aff)
aff
- a 4x4 matrix containing an affine transformation. Non-affine elements (the fourth row) are ignored.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object