public final class MutableInt3D
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
You use MutableInt3D as a STORED hash key at your peril: it has the same misfeature as Point, and you should read the warning in Int3D. However, you can look up Int3D-keyed objects in a hash table by passing in a MutableInt3D instead.
Constructor and Description |
---|
MutableInt3D() |
MutableInt3D(Int2D p)
Explicitly assumes the z value is set to 0
|
MutableInt3D(Int2D p,
int z) |
MutableInt3D(Int3D p) |
MutableInt3D(int x,
int y,
int z) |
MutableInt3D(MutableInt2D p) |
MutableInt3D(MutableInt2D p,
int z) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
double |
distance(Double3D p)
Returns the distance FROM this Int3D TO the specified point.
|
double |
distance(double x,
double y,
double z)
Returns the distance FROM this Int3D TO the specified point
|
double |
distance(Int3D p)
Returns the distance FROM this Int3D TO the specified point.
|
double |
distance(MutableInt3D p)
Returns the distance FROM this Int3D TO the specified point.
|
double |
distanceSq(Double3D p)
Returns the squared distance FROM this Int3D TO the specified point.
|
double |
distanceSq(double x,
double y,
double z)
Returns the squared distance FROM this Int3D TO the specified point
|
double |
distanceSq(Int3D p)
Returns the squared distance FROM this Int3D TO the specified point.
|
double |
distanceSq(MutableInt3D p)
Returns the squared distance FROM this Int3D TO the specified point.
|
boolean |
equals(java.lang.Object obj) |
int |
getX() |
int |
getY() |
int |
getZ() |
int |
hashCode() |
long |
manhattanDistance(Int3D p)
Returns the manhattan distance FROM this Int3D TO the specified point.
|
long |
manhattanDistance(int x,
int y,
int z)
Returns the manhattan distance FROM this Int3D TO the specified point.
|
long |
manhattanDistance(MutableInt3D p)
Returns the manhattan distance FROM this Int3D TO the specified point.
|
void |
setLocation(Int3D p)
Deprecated.
use setTo
|
void |
setLocation(int x,
int y,
int z)
Deprecated.
use setTo
|
void |
setLocation(MutableInt3D p)
Deprecated.
use setTo
|
void |
setTo(Int3D p) |
void |
setTo(int x,
int y,
int z) |
void |
setTo(MutableInt3D p) |
void |
setX(int val) |
void |
setY(int val) |
void |
setZ(int val) |
java.lang.String |
toCoordinates() |
java.lang.String |
toString() |
public MutableInt3D()
public MutableInt3D(int x, int y, int z)
public MutableInt3D(Int2D p)
public MutableInt3D(Int2D p, int z)
public MutableInt3D(Int3D p)
public MutableInt3D(MutableInt2D p)
public MutableInt3D(MutableInt2D p, int z)
public final int getX()
public final int getY()
public final int getZ()
public final void setX(int val)
public final void setY(int val)
public final void setZ(int val)
public void setTo(int x, int y, int z)
public void setTo(Int3D p)
public void setTo(MutableInt3D p)
public void setLocation(int x, int y, int z)
public void setLocation(Int3D p)
public void setLocation(MutableInt3D p)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toCoordinates()
public java.lang.Object clone()
clone
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public double distance(double x, double y, double z)
public double distance(Double3D p)
public double distance(MutableInt3D p)
public double distance(Int3D p)
public double distanceSq(double x, double y, double z)
public double distanceSq(Double3D p)
public double distanceSq(MutableInt3D p)
public double distanceSq(Int3D p)
public long manhattanDistance(int x, int y, int z)
public long manhattanDistance(MutableInt3D p)
public long manhattanDistance(Int3D p)