Class HoleLattice.Hole
java.lang.Object
|
+--HoleLattice.Hole
- Enclosing class:
- HoleLattice
- protected class HoleLattice.Hole
- extends java.lang.Object
Represents a hole/electron in motion.
|
Field Summary |
protected int |
oldPos
|
protected int |
oldX
|
protected int |
oldY
|
protected int |
pos
|
protected double |
progress
How close the hole/electron transition is to completion. |
protected int |
x
|
protected int |
y
|
|
Method Summary |
void |
advance()
Advances the hole/electron towards the current target. |
boolean |
isStationary()
|
void |
moveTo(int x,
int y,
int pos)
Advances the hole to the specified coordinates and state. |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
x
protected int x
y
protected int y
pos
protected int pos
oldX
protected int oldX
oldY
protected int oldY
oldPos
protected int oldPos
progress
protected double progress
- How close the hole/electron transition is to completion.
A value of
0 indicates that the transition has just
begun; 1 indicates that the transition is complete
(ie. no transition is in progress).
HoleLattice.Hole
public HoleLattice.Hole(int x,
int y,
int pos)
- Creates a new hole.
- Parameters:
x - The x-coordinate (in the lattice)y - The y-coordinate (in the lattice)pos - The state number
advance
public void advance()
- Advances the hole/electron towards the current target. If
animation is disabled, the electron will make the transition
instantly. If the hole is stationary, this method will have
no effect.
isStationary
public boolean isStationary()
moveTo
public void moveTo(int x,
int y,
int pos)
- Advances the hole to the specified coordinates and state. If
animation is enabled, the transition will occur gradually with
calls to
advance().