|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectatom
This class represents an atom, it stores information about its size, color and position relative to a lattice point
| Constructor Summary | |
atom(double x,
double y,
double z,
double mass,
java.awt.Color c)
constructer for an atom object, takes the coords, mass and color of the atom to be created |
|
| Method Summary | |
int |
compareTo(java.lang.Object o)
overides the Comparable compareTo method, this compares the passed object with this one and returns -1 if the passed atom is closer in depth than this one, 0 if they are at the same depth and 1 if it is at a lesser depth. |
void |
drawMe(java.awt.Graphics g2,
double screenPos)
draws the atom at the lattice point specified by screenPos |
void |
rotate(double angle)
rotates the atom arround an the (1,1,1) axis fixed at the 0 point |
void |
setBase(double x,
double y,
double z)
sets the position pos of the atom relative to a lattice point |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public atom(double x,
double y,
double z,
double mass,
java.awt.Color c)
| Method Detail |
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparable
public void drawMe(java.awt.Graphics g2,
double screenPos)
public void setBase(double x,
double y,
double z)
public void rotate(double angle)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||