|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsupport.convexhull.HullHelper
public class HullHelper
This class is the top level class for the online convex hull. It contains the
GUI acts as the overall control structure for implementors of the
ConvexHull interface and the HullCanvas.
ConvexHull,
HullCanvas| Field Summary |
|---|
| Fields inherited from interface support.convexhull.ConvexHullConstants |
|---|
BLUE_POINT_IMAGE, BOTTOM_COLOR, c, CANVAS_HEIGHT, CANVAS_WIDTH, ERROR_COLOR, FIGHTER_MODEL, FRAME_HEIGHT, FRAME_WIDTH, FRAME_X, FRAME_Y, HULL_CONNECT_COLOR, HULL_POINT_RADIUS, IMAGE_PATH, MODEL_PATH, OFF_HULL, ON_HULL, PURPLE_POINT_IMAGE, RED_POINT_IMAGE, ROBOT_MODEL, TOP_COLOR |
| Constructor Summary | |
|---|---|
HullHelper(ConvexHull hull)
Constructs a new HullHelper. |
|
| Method Summary | |
|---|---|
void |
addVertex(int x,
int y)
Adds a vertex to the screen. |
Iterator<Entry<Integer,HullPoint>>[] |
chains()
This method returns two Iterators containing the points in
the top and bottom chains. |
void |
clear()
Clears all points and edges from the screen. |
protected void |
loadFile()
Loads a file. |
void |
printPoints()
This outputs all the points to the shell. |
void |
runRobot()
Calls mture's magic 3d shit |
void |
setPointText(int x,
int y)
Sets the values in the texts boxes in the GUIPanel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HullHelper(ConvexHull hull)
HullHelper.
hull - The ConvexHull for which this
HullHelper will be the frontend.| Method Detail |
|---|
protected void loadFile()
public void addVertex(int x,
int y)
insert from
ConvexHull. It then calls addVertex from
HullCanvas
x - The x coordinate of the point.y - The y coordinate of the point.
public void setPointText(int x,
int y)
x - The x coordinate to be displayedy - The y coordinate to be displayedpublic void clear()
clear on the ConvexHull.
public Iterator<Entry<Integer,HullPoint>>[] chains()
Iterators containing the points in
the top and bottom chains.
public void runRobot()
public void printPoints()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||