Package com.luciad.cartesian
Class Coordinate
java.lang.Object
com.luciad.cartesian.Coordinate
A "POD" for a 3D coordinate.
Not a geometry, to be used as primitive in geometries.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a coordinate with default values forx,y, andzusing 0.Coordinate(double x, double y) Constructs a coordinate with the provide values forx,y, andz.Coordinate(double x, double y, double z) Constructs a coordinate with the provide values forx,y, andz. -
Method Summary
Modifier and TypeMethodDescriptionadd(Coordinate other) divide(double factor) booleandoublegetX()The x value of the coordinate.doublegetY()The y value of the coordinate.doublegetZ()The z value of the coordinate.inthashCode()Returns the hash for this coordinate.minus(Coordinate other) multiply(double factor) plus(Coordinate other) subtract(Coordinate other) toString()
-
Constructor Details
-
Coordinate
public Coordinate()Constructs a coordinate with default values forx,y, andzusing 0. -
Coordinate
public Coordinate(double x, double y) Constructs a coordinate with the provide values forx,y, andz.- Parameters:
x- the x value of the coordinate.y- the y value of the coordinate.
-
Coordinate
public Coordinate(double x, double y, double z) Constructs a coordinate with the provide values forx,y, andz.- Parameters:
x- the x value of the coordinate.y- the y value of the coordinate.z- the z value of the coordinate.
-
-
Method Details
-
getX
public double getX()The x value of the coordinate. -
getY
public double getY()The y value of the coordinate. -
getZ
public double getZ()The z value of the coordinate. -
equals
-
hashCode
public int hashCode()Returns the hash for this coordinate. -
toString
-
add
-
subtract
-
multiply
-
divide
-
plus
-
minus
-