public final class Point3D extends Object implements Cloneable, Serializable
Point3D
class represents a point in a 3D space.Modifier and Type | Field and Description |
---|---|
double |
x
The X coordinate of this
Point3D in coordinate system units. |
double |
y
The Y coordinate of this
Point3D in coordinate system units. |
double |
z
The Z coordinate, elevation or altitude of this
Point3D in
meters. |
Constructor and Description |
---|
Point3D(double x,
double y)
Initializes a newly created
Point3D instance with the values
specified and 0 (zero) for the Z-coordinate. |
Point3D(double x,
double y,
double z)
Initializes a newly created
Point3D instance with the values
specified. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates and returns a copy of this
Point3D instance. |
boolean |
equals(Object obj)
Compares this
Point3D object to the specified object. |
boolean |
equals(Point3D pt)
Compares this
Point3D object to the specified
Point3D object. |
int |
hashCode()
Returns the hash code for this
Point3D instance. |
String |
toString()
Returns a string representation of this
Point3D instance. |
public final double x
Point3D
in coordinate system units.public final double y
Point3D
in coordinate system units.public final double z
Point3D
in
meters.public Point3D(double x, double y, double z)
Point3D
instance with the values
specified.x
- the X coordinate of this Point3D
in coordinate
system unitsy
- the Y coordinate of this Point3D
in coordinate
system unitsz
- the Z coordinate, elevation or altitude of this
Point3D
in meterspublic Point3D(double x, double y)
Point3D
instance with the values
specified and 0 (zero) for the Z-coordinate.x
- the X coordinate of this Point3D
in coordinate
system unitsy
- the Y coordinate of this Point3D
in coordinatepublic Object clone()
Point3D
instance.public boolean equals(Object obj)
Point3D
object to the specified object. The
result is true
if and only if the argument is not
null
and is a Point3D
object that represents
the same position as this object.public boolean equals(Point3D pt)
Point3D
object to the specified
Point3D
object. The result is true
if and only
if the argument is not null
and represents the same position
as this object.pt
- the Point3D
object to compare this
Point3D
instance againsttrue
if the Point3D
objects are equal;
false
otherwise.public int hashCode()
Point3D
instance.public String toString()
Point3D
instance.
This method is intended to be used only for debugging purposes, and the
content and format of the returned string may vary between
implementations. The returned string may be empty but may not be
null
.Copyright © 2009 - 2016 DataGis. All Rights Reserved.