Spec-Zone .ru
спецификации, руководства, описания, API
|
public class Point3D
extends java.lang.Object
Constructor and Description |
---|
Point3D(double x,
double y,
double z)
Creates a new instance of
Point3D . |
Modifier and Type | Method and Description |
---|---|
double |
distance(double x1,
double y1,
double z1)
Computes the distance between this point and point
(x1, y1, z1) . |
double |
distance(Point3D p)
Computes the distance between this point and point
p . |
boolean |
equals(java.lang.Object obj)
Returns a hash code value for the point.
|
double |
getX()
The x coordinate.
|
double |
getY()
The y coordinate.
|
double |
getZ()
The z coordinate.
|
int |
hashCode()
Returns a hash code for this
Point3D object. |
java.lang.String |
toString()
Returns a string representation of this
Point3D . |
public Point3D(double x, double y, double z)
Point3D
.x
- The X coordinate of the Point3D
y
- The Y coordinate of the Point3D
z
- The Z coordinate of the Point3D
public final double getX()
public final double getY()
public final double getZ()
public double distance(double x1, double y1, double z1)
(x1, y1, z1)
.x1
- the x coordinate of other pointy1
- the y coordinate of other pointz1
- the z coordinate of other point(x1, y1, z1)
.public double distance(Point3D p)
p
.p
- the other pointp
.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
Point3D
object.hashCode
in class java.lang.Object
Point3D
object.public java.lang.String toString()
Point3D
.
This method is intended to be used only for informational purposes.
The content and format of the returned string might vary between
implementations.
The returned string might be empty but cannot be null
.toString
in class java.lang.Object
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to