Package org.anchoranalysis.spatial.point
Class Point3f
- All Implemented Interfaces:
Serializable
A three-dimensional point of float values.
We consider a point to be a tuple representing a single physical point in space.
- Author:
- Owen Feehan
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
final double
The Euclidean distance between this point and another.float
distanceSquared
(Point3f point) The square of the Euclidean distance between this point and another.boolean
int
hashCode()
Methods inherited from class org.anchoranalysis.spatial.point.Tuple3f
setValueByDimension, toString, valueByDimension, valueByDimension, x, x, y, y, z, z
-
Constructor Details
-
Point3f
public Point3f()Creates the points with a 0 in each dimension. -
Point3f
Creates with the same values as an existingPoint3f
.- Parameters:
point
- to copy values from.
-
Point3f
public Point3f(float x, float y, float z) Create with values for each dimension.- Parameters:
x
- the value for the X-dimension.y
- the value for the Y-dimension.z
- the value for the Z-dimension.
-
-
Method Details
-
distance
The Euclidean distance between this point and another.- Parameters:
point
- the other point to a measure a distance to.- Returns:
- the distance.
-
distanceSquared
The square of the Euclidean distance between this point and another.- Parameters:
point
- the other point to a measure a distance to.- Returns:
- the distance squared.
-
equals
-
canEqual
-
hashCode
public int hashCode()
-