## org.jscience.chemistry.gui.extended.geometry Class Point3D

```java.lang.Object
org.jscience.chemistry.gui.extended.geometry.Point3D
```

`public class Point3Dextends java.lang.Object`

A class that provides mathematical definition of and utility for 3D geometric points

Field Summary
`protected  double` `x`
X coordinates in 3D space
`protected  double` `y`
Y coordinates in 3D space
`protected  double` `z`
Z coordinates in 3D space

Constructor Summary
`Point3D()`
default constructor: coordinates are all 0.0;
```Point3D(double x, double y, double z)```
full constructor
`Point3D(Point3D p)`
copy constructor

Method Summary
` Angle` ```angleWith(Point3D P1, Point3D P2)```
calculate angle among three points in 3D space note: calling distSquare() is more efficient than distance().
` double` `distanceTo(Point3D P)`
calculate distance from this point to the other
` double` `distSquareTo(Point3D P)`
calculate the squre of distance from this point to the other
` double` `getX()`
Return X coordinate
` double` `getY()`
Return Y coordinate
` double` `getZ()`
Return Z coordinate
` void` `setX(double x)`
Set X coordinate
` void` `setY(double y)`
Set Y coordinate
` void` `setZ(double z)`
Set Z coordinate
` void` ```translate(double dx, double dy, double dz)```
move(translate) this point by the input quantity along the 3 axises
` void` `translate(GeoVector3D gv)`
move(translate) this point along with the input geometric vector

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### x

`protected double x`
X coordinates in 3D space

### y

`protected double y`
Y coordinates in 3D space

### z

`protected double z`
Z coordinates in 3D space

Constructor Detail

### Point3D

`public Point3D()`
default constructor: coordinates are all 0.0;

### Point3D

```public Point3D(double x,
double y,
double z)```
full constructor

Parameters:
`x` - X coordinate double
`y` - Y coordinate double
`z` - Z coordinate double

### Point3D

`public Point3D(Point3D p)`
copy constructor

Parameters:
`p` - the point to be copied
Method Detail

### distanceTo

`public double distanceTo(Point3D P)`
calculate distance from this point to the other

Parameters:
`P` - the other Point
Returns:
DOCUMENT ME!

### distSquareTo

`public double distSquareTo(Point3D P)`
calculate the squre of distance from this point to the other

Parameters:
`P` - the other Point
Returns:
distance : |P1P2|^2

### angleWith

```public Angle angleWith(Point3D P1,
Point3D P2)```
calculate angle among three points in 3D space note: calling distSquare() is more efficient than distance().

Parameters:
`P1` - y1, z1 : coordinates of point P1
`P2` - y2, z2 : coordinates of point P2
Returns:
angle : angle P1-this point-P2

### translate

`public void translate(GeoVector3D gv)`
move(translate) this point along with the input geometric vector

Parameters:
`gv` - geometric vector

### translate

```public void translate(double dx,
double dy,
double dz)```
move(translate) this point by the input quantity along the 3 axises

Parameters:
`dx` - translation along x axis
`dy` - translation along y axis
`dz` - translation along z axis

### getX

`public double getX()`
Return X coordinate

Returns:
DOCUMENT ME!

### getY

`public double getY()`
Return Y coordinate

Returns:
DOCUMENT ME!

### getZ

`public double getZ()`
Return Z coordinate

Returns:
DOCUMENT ME!

### setX

`public void setX(double x)`
Set X coordinate

Parameters:
`x` - DOCUMENT ME!

### setY

`public void setY(double y)`
Set Y coordinate

Parameters:
`y` - DOCUMENT ME!

### setZ

`public void setZ(double z)`
Set Z coordinate

Parameters:
`z` - DOCUMENT ME!