|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.chemistry.quantum.math.vector.Vector3D
public class Vector3D
A special class representing R^3 vector. This class is purposely not derived from VectorND class, use toVectorND() method get an instance compliant with VectorND.
| Field Summary | |
|---|---|
static Vector3D |
NULL_VECTOR
Null vector in 3 dimensional space |
static Vector3D |
UX
Unit vector along X in 3 dimensional space |
static Vector3D |
UY
Unit vector along Y in 3 dimensional space |
static Vector3D |
UZ
Unit vector along Z in 3 dimensional space |
| Constructor Summary | |
|---|---|
Vector3D()
Creates a new instance of Vector3D |
|
Vector3D(double i,
double j,
double k)
Creates a new Vector3D object. |
|
Vector3D(Point3D point)
Creates a new Vector3D object. |
|
| Method Summary | |
|---|---|
Vector3D |
add(Vector3D b)
addition of two vectors |
double |
angleWith(Vector3D b)
Find the angle made with the vector. |
java.lang.Object |
clone()
clone this vector ;) Cloning is getting interesting! |
Vector3D |
cross(Vector3D b)
The cross product of two vectors (a.b). |
double |
dot(Vector3D b)
The dot product of two vectors (a.b) |
boolean |
equals(java.lang.Object obj)
overloaded equals() method |
double |
getI()
Getter for property i. |
double |
getJ()
Getter for property j. |
double |
getK()
Getter for property k. |
int |
hashCode()
overriden hashCode() method |
double |
magnitude()
The magnitude of this vector |
Vector3D |
mul(double k)
multiplication of this vector with a scalar k |
Vector3D |
negate()
negate this vector |
Vector3D |
normalize()
get the normalized form of this vector |
void |
setI(double i)
Setter for property i. |
void |
setJ(double j)
Setter for property j. |
void |
setK(double k)
Setter for property k. |
Vector3D |
sub(Vector3D b)
substraction of two vectors (this - b) |
java.lang.String |
toString()
the overridden toString() method |
VectorND |
toVectorND()
method to convert this object to one representing a general Vector |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Vector3D NULL_VECTOR
public static final Vector3D UX
public static final Vector3D UY
public static final Vector3D UZ
| Constructor Detail |
|---|
public Vector3D()
public Vector3D(double i,
double j,
double k)
i - DOCUMENT ME!j - DOCUMENT ME!k - DOCUMENT ME!public Vector3D(Point3D point)
point - DOCUMENT ME!| Method Detail |
|---|
public Vector3D add(Vector3D b)
b - : to be added to the current vector
public Vector3D mul(double k)
k - k : the scalar to be multiplied to this vector
public Vector3D sub(Vector3D b)
b - : to be substracted from the current vector
public double dot(Vector3D b)
b - vector with which the dot product is to be evaluated
public Vector3D cross(Vector3D b)
b - vector with which the cross product is to be evaluated
public double magnitude()
public double angleWith(Vector3D b)
b - DOCUMENT ME!
public Vector3D normalize()
public Vector3D negate()
public java.lang.Object clone()
clone in class java.lang.Objectpublic VectorND toVectorND()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - DOCUMENT ME!
public int hashCode()
hashCode in class java.lang.Objectpublic double getI()
public void setI(double i)
i - New value of property i.public double getJ()
public void setJ(double j)
j - New value of property j.public double getK()
public void setK(double k)
k - New value of property k.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||