|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjgromacs.data.Point3D
public class Point3D
Objects of this class represent a single 3D point
| Constructor Summary | |
|---|---|
Point3D()
Constructs a new Point3D object |
|
Point3D(double x,
double y,
double z)
Constructs a new Point3D object with the given coordinates |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Returns an identical Point3D object |
Point3D |
crossProduct(Point3D other)
Returns the cross product of this vector and another vector |
double |
distance(Point3D other)
Returns the Euclidean distance between this point and another point |
boolean |
equals(java.lang.Object other)
Returns true if the two 3D points are identical |
double |
getX()
Returns the X coordinate of point |
double |
getY()
Returns the Y coordinate of point |
double |
getZ()
Returns the Z coordinate of point |
int |
hashCode()
Returns hash code |
double |
innerProduct(Point3D other)
Returns the inner product of this vector and another vector |
double |
length()
Returns the length of the vector |
Point3D |
minus(Point3D other)
Subtracts another vector from this vector |
Point3D |
multiplyByScalar(double scalar)
Returns this vector multiplied by a scalar |
Point3D |
plus(Point3D other)
Adds another vector to this vector |
void |
setX(double x)
Sets the X coordinate of point |
void |
setY(double y)
Sets the Y coordinate of point |
void |
setZ(double z)
Sets the Z coordinate of point |
java.lang.String |
toString()
Returns the String representation of point |
Point3D |
transformByMatrix(Jama.Matrix matrix)
Returns the resulting vector of a matrix transformation |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Point3D()
public Point3D(double x,
double y,
double z)
x - X coordinatey - Y coordinatez - Z coordinate| Method Detail |
|---|
public double getX()
public void setX(double x)
x - X coordinatepublic double getY()
public void setY(double y)
y - Y coordinatepublic double getZ()
public void setZ(double z)
z - Z coordinatepublic double distance(Point3D other)
other - another point
public Point3D plus(Point3D other)
other - another vector
public Point3D minus(Point3D other)
other - another vector
public double innerProduct(Point3D other)
other - another vector
public Point3D crossProduct(Point3D other)
other - another vector
public Point3D multiplyByScalar(double scalar)
scalar - scalar value
public double length()
public Point3D transformByMatrix(Jama.Matrix matrix)
matrix - 3x3 transformation matrix
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - the other pointpublic int hashCode()
hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||