public final class Point3f extends Tuple3f
We consider a point to be a tuple representing a single physical point in space.
Constructor and Description |
---|
Point3f()
Creates the points with a 0 in each dimension.
|
Point3f(float x,
float y,
float z)
Create with values for each dimension.
|
Point3f(Point3f point)
Creates with the same values as an existing
Point3f . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
double |
distance(Point3f point)
The Euclidean distance between this point and another.
|
float |
distanceSquared(Point3f point)
The square of the Euclidean distance between this point and another.
|
boolean |
equals(Object o) |
int |
hashCode() |
setValueByDimension, toString, valueByDimension, valueByDimension, x, x, y, y, z, z
public Point3f()
public Point3f(Point3f point)
Point3f
.point
- to copy values from.public Point3f(float x, float y, float z)
x
- the value for the X-dimension.y
- the value for the Y-dimension.z
- the value for the Z-dimension.public final double distance(Point3f point)
point
- the other point to a measure a distance to.public float distanceSquared(Point3f point)
point
- the other point to a measure a distance to.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.