public class Point3D
extends java.awt.Point
Modifier and Type | Field and Description |
---|---|
int |
z |
Constructor and Description |
---|
Point3D(int x,
int y,
int z)
Creates a three dimensional coordinate with the given location.
|
Modifier and Type | Method and Description |
---|---|
double |
distance(Point3D other)
Returns the linear distance between this coordinate point and the provided one.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
int |
manhattanDistance(Point3D other)
Returns the Manhattan distance between this point and the provided one.
|
int |
maxAxisDistance(Point3D other)
Returns the largest difference between the two points along any one axis.
|
double |
squareDistance(Point3D other)
Returns the square of the linear distance between this coordinate
point and the provided one.
|
getLocation, getX, getY, move, setLocation, setLocation, setLocation, toString, translate
public Point3D(int x, int y, int z)
x
- y
- z
- public double distance(Point3D other)
other
- public double squareDistance(Point3D other)
other
- public int manhattanDistance(Point3D other)
other
- public int maxAxisDistance(Point3D other)
other
- public int hashCode()
hashCode
in class java.awt.geom.Point2D
public boolean equals(java.lang.Object o)
equals
in class java.awt.Point