|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ConvexHull
This is the top level interface for an implementation of the "online" convexhull algorithm. This interface defines callbacks that are provided by the GUI.
| Method Summary | |
|---|---|
Iterator<Entry<Integer,HullPoint>> |
bottomChain()
Get an Iterator containing all
Entry<Integer, HullPoint> in the bottom chain of the hull. |
void |
clear()
When the user clicks on the "Clear" button the HullHelper class will call this method. |
void |
insert(HullPoint vertex)
This method will be called by the HullHelper when
a user clicks on the screen to add a vertex. |
Iterator<Entry<Integer,HullPoint>> |
topChain()
Get an Iterator containing all
Entry<Integer, HullPoint> in the top chain of the hull. |
| Method Detail |
|---|
void insert(HullPoint vertex)
HullHelper when
a user clicks on the screen to add a vertex. When the GUI calls
this method, the ConvexHull should decide if the new
vertex should be on the hull or not. If the new point is on the
hull, the ConvexHull should add it to the hull, and
then adjust the hull so that it is now convex. The point is
guaranteed to be in the "off" hull state.
DO NOT CALL THIS METHOD EXPLICITLY!
vertex - the newly created vertex resulting from a user click.void clear()
HullHelper class will call this method. The GUI will
hide all of the points and erase all of the lines. The
ConvexHull should reset its internal state.DO NOT CALL THIS METHOD EXPLICITLY!
Iterator<Entry<Integer,HullPoint>> topChain()
Iterator containing all
Entry<Integer, HullPoint> in the top chain of the hull.
Iterator of points in upper halfIterator<Entry<Integer,HullPoint>> bottomChain()
Iterator containing all
Entry<Integer, HullPoint> in the bottom chain of the hull.
Iterator of points in lower half
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||