|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.chemistry.gui.extended.geometry.Point3D
public class Point3D
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 |
|---|
protected double x
protected double y
protected double z
| Constructor Detail |
|---|
public Point3D()
public Point3D(double x,
double y,
double z)
x - X coordinate doubley - Y coordinate doublez - Z coordinate doublepublic Point3D(Point3D p)
p - the point to be copied| Method Detail |
|---|
public double distanceTo(Point3D P)
P - the other Point
public double distSquareTo(Point3D P)
P - the other Point
public Angle angleWith(Point3D P1,
Point3D P2)
P1 - y1, z1 : coordinates of point P1P2 - y2, z2 : coordinates of point P2
public void translate(GeoVector3D gv)
gv - geometric vector
public void translate(double dx,
double dy,
double dz)
dx - translation along x axisdy - translation along y axisdz - translation along z axispublic double getX()
public double getY()
public double getZ()
public void setX(double x)
x - DOCUMENT ME!public void setY(double y)
y - DOCUMENT ME!public void setZ(double z)
z - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||