class Coordinate extends Comparable[Coordinate] with Cloneable with Serializable
- Annotations
- @SerialVersionUID()
- Alphabetic
- By Inheritance
- Coordinate
- Serializable
- Cloneable
- Comparable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Coordinate()
Constructs a
Coordinateat (0,0,NaN). - new Coordinate(x: Double, y: Double)
Constructs a
Coordinateat (x,y,NaN).Constructs a
Coordinateat (x,y,NaN).- x
the x-value
- y
the y-value
- new Coordinate(c: Coordinate)
Constructs a
Coordinatehaving the same (x,y,z) values asother.Constructs a
Coordinatehaving the same (x,y,z) values asother.- c
the
Coordinateto copy.
- new Coordinate(x: Double, y: Double, z: Double)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): Coordinate
- Definition Classes
- Coordinate → AnyRef
- def compareTo(o: Coordinate): Int
Compares this {link Coordinate} with the specified {link Coordinate} for order.
Compares this {link Coordinate} with the specified {link Coordinate} for order. This method ignores the z value when making the comparison. Returns: <UL> <LI> -1 : this.x < other.x || ((this.x == other.x) && (this.y < other.y)) <LI> 0 : this.x == other.x && this.y = other.y <LI> 1 : this.x > other.x || ((this.x == other.x) && (this.y > other.y))
</UL> Note: This method assumes that ordinate values are valid numbers. NaN values are not handled correctly.
- o
the
Coordinatewith which thisCoordinateis being compared return -1, zero, or 1 as thisCoordinateis less than, equal to, or greater than the specifiedCoordinate
- Definition Classes
- Coordinate → Comparable
- def copy: Coordinate
Creates a copy of this Coordinate.
Creates a copy of this Coordinate.
return a copy of this coordinate.
- def distance(c: Coordinate): Double
Computes the 2-dimensional Euclidean distance to another location.
Computes the 2-dimensional Euclidean distance to another location. The Z-ordinate is ignored.
- c
a point return the 2-dimensional Euclidean distance between the locations
- def distance3D(c: Coordinate): Double
Computes the 3-dimensional Euclidean distance to another location.
Computes the 3-dimensional Euclidean distance to another location.
- c
a coordinate return the 3-dimensional Euclidean distance between the locations
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equalInZ(c: Coordinate, tolerance: Double): Boolean
Tests if another coordinate has the same value for Z, within a tolerance.
Tests if another coordinate has the same value for Z, within a tolerance.
- c
a coordinate
- tolerance
the tolerance value return true if the Z ordinates are within the given tolerance
- def equals(other: Any): Boolean
Returns
trueifotherhas the same values for the x and y ordinates.Returns
trueifotherhas the same values for the x and y ordinates. Since Coordinates are 2.5D, this routine ignores the z value when making the comparison.- other
a
Coordinatewith which to do the comparison. returntrueifotheris aCoordinatewith the same values for the x and y ordinates.
- Definition Classes
- Coordinate → AnyRef → Any
- def equals2D(c: Coordinate, tolerance: Double): Boolean
Tests if another Coordinate has the same values for the X and Y ordinates, within a specified tolerance value.
Tests if another Coordinate has the same values for the X and Y ordinates, within a specified tolerance value. The Z ordinate is ignored.
- c
a
Coordinatewith which to do the 2D comparison.- tolerance
the tolerance value to use return true if
otheris aCoordinatewith the same values for X and Y.
- def equals2D(other: Coordinate): Boolean
Returns whether the planar projections of the two
Coordinates are equal.Returns whether the planar projections of the two
Coordinates are equal.- other
a
Coordinatewith which to do the 2D comparison. returntrueif the x- and y-coordinates are equal; the z-coordinates do not have to be equal.
- def equals3D(other: Coordinate): Boolean
Tests if another coordinate has the same values for the X, Y and Z ordinates.
Tests if another coordinate has the same values for the X, Y and Z ordinates.
- other
a
Coordinatewith which to do the 3D comparison. return true ifotheris aCoordinatewith the same values for X, Y and Z.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getM: Double
Retrieves the value of the measure, if present.
Retrieves the value of the measure, if present. If no measure value is present returns NaN.
return the value of the measure, or NaN
- def getOrdinate(ordinateIndex: Int): Double
Gets the ordinate value for the given index.
Gets the ordinate value for the given index.
The base implementation supports values for the index are {link X}, {link Y}, and {link Z}.
- ordinateIndex
the ordinate index return the value of the ordinate throws IllegalArgumentException if the index is not valid
- def getX: Double
Retrieves the value of the X ordinate.
Retrieves the value of the X ordinate.
return the value of the X ordinate
- def getY: Double
Retrieves the value of the Y ordinate.
Retrieves the value of the Y ordinate.
return the value of the Y ordinate
- def getZ: Double
Retrieves the value of the Z ordinate, if present.
Retrieves the value of the Z ordinate, if present. If no Z value is present returns NaN.
return the value of the Z ordinate, or NaN
- def hashCode(): Int
Gets a hashcode for this coordinate.
Gets a hashcode for this coordinate.
return a hashcode for this coordinate
- Definition Classes
- Coordinate → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def setCoordinate(other: Coordinate): Unit
Sets this
Coordinates (x,y,z) values to that ofother.Sets this
Coordinates (x,y,z) values to that ofother.- other
the
Coordinateto copy
- def setM(m: Double): Unit
Sets the measure value, if supported.
Sets the measure value, if supported.
- m
the value to set as M
- def setOrdinate(ordinateIndex: Int, value: Double): Unit
Sets the ordinate for the given index to a given value.
Sets the ordinate for the given index to a given value.
The base implementation supported values for the index are {link X}, {link Y}, and {link Z}.
- ordinateIndex
the ordinate index
- value
the value to set throws IllegalArgumentException if the index is not valid
- def setX(x: Double): Unit
Sets the X ordinate value.
Sets the X ordinate value.
- x
the value to set as X
- def setY(y: Double): Unit
Sets the Y ordinate value.
Sets the Y ordinate value.
- y
the value to set as Y
- def setZ(z: Double): Unit
Sets the Z ordinate value.
Sets the Z ordinate value.
- z
the value to set as Z
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
Returns a
Stringof the form <I>(x,y,z)</I> .Returns a
Stringof the form <I>(x,y,z)</I> .return a
Stringof the form <I>(x,y,z)</I>- Definition Classes
- Coordinate → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- var x: Double
- var y: Double
- var z: Double