public class GridPoint3 extends Object implements Serializable
Constructor and Description |
---|
GridPoint3()
Constructs a 3D grid point with all coordinates pointing to the origin (0, 0, 0).
|
GridPoint3(GridPoint3 point)
Copy constructor
|
GridPoint3(int x,
int y,
int z)
Constructs a 3D grid point.
|
Modifier and Type | Method and Description |
---|---|
GridPoint3 |
add(GridPoint3 other)
Adds another 3D grid point to this point.
|
GridPoint3 |
add(int x,
int y,
int z)
Adds another 3D grid point to this point.
|
GridPoint3 |
cpy() |
float |
dst(GridPoint3 other) |
float |
dst(int x,
int y,
int z) |
float |
dst2(GridPoint3 other) |
float |
dst2(int x,
int y,
int z) |
boolean |
equals(Object o) |
int |
hashCode() |
GridPoint3 |
set(GridPoint3 point)
Sets the coordinates of this 3D grid point to that of another.
|
GridPoint3 |
set(int x,
int y,
int z)
Sets the coordinates of this GridPoint3D.
|
GridPoint3 |
sub(GridPoint3 other)
Subtracts another 3D grid point from this point.
|
GridPoint3 |
sub(int x,
int y,
int z)
Subtracts another 3D grid point from this point.
|
String |
toString() |
public GridPoint3()
public GridPoint3(int x, int y, int z)
x
- X coordinatey
- Y coordinatez
- Z coordinatepublic GridPoint3(GridPoint3 point)
point
- The 3D grid point to make a copy of.public GridPoint3 set(GridPoint3 point)
point
- The 3D grid point to copy coordinates of.public GridPoint3 set(int x, int y, int z)
x
- X coordinatey
- Y coordinatez
- Z coordinatepublic float dst2(GridPoint3 other)
other
- The other pointpublic float dst2(int x, int y, int z)
x
- The x-coordinate of the other pointy
- The y-coordinate of the other pointz
- The z-coordinate of the other pointpublic float dst(GridPoint3 other)
other
- The other pointpublic float dst(int x, int y, int z)
x
- The x-coordinate of the other pointy
- The y-coordinate of the other pointz
- The z-coordinate of the other pointpublic GridPoint3 add(GridPoint3 other)
other
- The other pointpublic GridPoint3 add(int x, int y, int z)
x
- The x-coordinate of the other pointy
- The y-coordinate of the other pointz
- The z-coordinate of the other pointpublic GridPoint3 sub(GridPoint3 other)
other
- The other pointpublic GridPoint3 sub(int x, int y, int z)
x
- The x-coordinate of the other pointy
- The y-coordinate of the other pointz
- The z-coordinate of the other pointpublic GridPoint3 cpy()
Copyright © 2017. All rights reserved.