Package inra.ijpb.geometry
Class Point3D
java.lang.Object
inra.ijpb.geometry.Point3D
public class Point3D
extends java.lang.Object
A point in the 3-dimensional Euclidean space, defined by x, y, and z coordinates.
- Author:
- dlegland
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Point3D
public Point3D()Creates a new point located at the origin. -
Point3D
public Point3D(double x, double y, double z)Creates a new point at the specified coordinates.- Parameters:
x
- the X-coordinate of the pointy
- the Y-coordinate of the pointz
- the Z-coordinate of the point
-
-
Method Details
-
distance
Computes the euclidean distance to another point.- Parameters:
point
- the other point- Returns:
- the distance between this point and the query point
-
getX
public double getX()- Returns:
- the X-coordinate of the point
-
getY
public double getY()- Returns:
- the Y-coordinate of the point
-
getZ
public double getZ()- Returns:
- the Z-coordinate of the point
-