public class Coordinate extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
static int |
COORDINATE_TYPE_ATLAS |
static int |
COORDINATE_TYPE_INDEX |
static int |
COORDINATE_TYPE_MM |
static int |
COORDINATE_TYPE_WORLD |
static double |
OUT_OF_RANGE |
double |
xDbl |
int |
xInt |
double |
yDbl |
int |
yInt |
double |
zDbl |
int |
zInt |
Constructor and Description |
---|
Coordinate()
Default constructor.
|
Coordinate(Coordinate coor)
Copy constructor.
|
Coordinate(double x,
double y,
double z)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a copy of this object.
|
double |
distance(Coordinate coor)
Returns the distance between this Coordinate and another.
|
boolean |
equals(Object obj)
Tests equality.
|
double[] |
getValues()
Returns an array of coordinate values.
|
int |
hashCode()
Compute hash code.
|
boolean |
isAllZeros()
This method can be used to check if all values are zero.
|
boolean |
isOutOfRange()
Returns true if any coordinate value is NaN.
|
void |
setValues(Coordinate coor)
Sets the values of this Coordinate to that of another Coordinate
|
void |
setValues(double x,
double y,
double z)
Sets the values of this Coordinate.
|
void |
setValuesRound(double x,
double y,
double z)
Sets the values of this Coordinate and rounds the integer values.
|
String |
toString()
Returns a string representation of this object.
|
public double xDbl
public double yDbl
public double zDbl
public int xInt
public int yInt
public int zInt
public static final double OUT_OF_RANGE
public static final int COORDINATE_TYPE_ATLAS
public static final int COORDINATE_TYPE_INDEX
public static final int COORDINATE_TYPE_MM
public static final int COORDINATE_TYPE_WORLD
public Coordinate()
public Coordinate(Coordinate coor)
coor
- The Coordinate object to copy.public Coordinate(double x, double y, double z)
x
- The X value.y
- The Y value.z
- The Z value.public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- clone not supported exceptionpublic double distance(Coordinate coor)
coor
- the other coordinatepublic boolean equals(Object obj)
public double[] getValues()
public int hashCode()
public boolean isAllZeros()
public boolean isOutOfRange()
public final void setValues(Coordinate coor)
coor
- The replacement Coordinate.public void setValues(double x, double y, double z)
x
- The X value.y
- The Y value.z
- The Z value.public void setValuesRound(double x, double y, double z)
x
- The X value.y
- The Y value.z
- The Z value.