Package org.anchoranalysis.spatial.point
Class Point3f
Object
org.anchoranalysis.spatial.point.Tuple3f
org.anchoranalysis.spatial.point.Point3f
- All Implemented Interfaces:
Serializable
public final class Point3f extends Tuple3f
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:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected booleancanEqual(Object other)doubledistance(Point3f point)The Euclidean distance between this point and another.floatdistanceSquared(Point3f point)The square of the Euclidean distance between this point and another.booleanequals(Object o)inthashCode()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()
-