|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.pacbell.jfai.toh.ui.PinView
public class PinView
Visualizes a pin of the Tower Of Hanoi puzzle.
| Constructor Summary | |
|---|---|
PinView(Pin aModel,
Point3f baseLocation,
Appearance anAppearance)
Create a new instance given a Pin as the model and the location of the base cap of the pin. |
|
| Method Summary | |
|---|---|
Point3f |
diskLocation(Disk disk)
Answer a point for the center of the disk view of the given disk. |
Point3f |
diskLocation(int topPosition)
Answer a point for the center of the disk view that represents the disk in the tower with the given 1-based position. |
Appearance |
getAppearance()
Gets the appearance. |
Point3f |
getBaseLocation()
Gets the point where the pin and the base meet. |
BranchGroup |
getGroup()
Gets the branch group. |
Pin |
getModel()
Gets the model. |
Point3f |
getTopLocation()
Gets the position of the pin's top. |
static float |
height()
Answers the pin height. |
static float |
stackHeight()
Answers the maximum height of a stack of disks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PinView(Pin aModel,
Point3f baseLocation,
Appearance anAppearance)
aModel - a PinbaseLocation - the absolute position where the pin meets the baseanAppearance - the Appearance| Method Detail |
|---|
public static final float height()
public static final float stackHeight()
public Point3f diskLocation(Disk disk)
disk - a Disk
public Point3f diskLocation(int topPosition)
topPosition - This is 1 for the disk at the top. It increases by 1
for each disk in the stack (if any).
public Appearance getAppearance()
public Point3f getBaseLocation()
public BranchGroup getGroup()
public Pin getModel()
public Point3f getTopLocation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||