JavaFX 2.2
javafx.geometry

Class Point3D

• java.lang.Object
• javafx.geometry.Point3D

• public class Point3D
extends java.lang.Object
A 3D geometric point that represents the x, y, z coordinates.
Since:
JavaFX 1.3
• Constructor Summary

Constructors
Constructor and Description
Point3D(double x, double y, double z)
Creates a new instance of Point3D.
• Method Summary

Methods
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.
• Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• Constructor Detail

• Point3D

public Point3D(double x,
double y,
double z)
Creates a new instance of Point3D.
Parameters:
x - The X coordinate of the Point3D
y - The Y coordinate of the Point3D
z - The Z coordinate of the Point3D
• Method Detail

• getX

public final double getX()
The x coordinate.
Returns:
the x coordinate
• getY

public final double getY()
The y coordinate.
Returns:
the y coordinate
• getZ

public final double getZ()
The z coordinate.
Returns:
the z coordinate
• distance

public double distance(double x1,
double y1,
double z1)
Computes the distance between this point and point (x1, y1, z1).
Parameters:
x1 - the x coordinate of other point
y1 - the y coordinate of other point
z1 - the z coordinate of other point
Returns:
the distance between this point and point (x1, y1, z1).
• distance

public double distance(Point3D p)
Computes the distance between this point and point p.
Parameters:
p - the other point
Returns:
the distance between this point and point p.
• equals

public boolean equals(java.lang.Object obj)
Returns a hash code value for the point.
Overrides:
equals in class java.lang.Object
Returns:
a hash code value for the point.
• hashCode

public int hashCode()
Returns a hash code for this Point3D object.
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this Point3D object.
• toString

public java.lang.String toString()
Returns a string representation of this 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.
Overrides:
toString in class java.lang.Object
JavaFX 2.2