|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectHull2.JarvisMarch
public class JarvisMarch
The Jarvis March class that realizes the Jarvis March algorithm to calculate the convex hull shape of a given area of points with X - Y co-ordinates. Takes to arrays, one for the X points and one for the Y points, calculates the convex hull and gives as output an array list with all the points that constracts the hull shape.
| Nested Class Summary | |
|---|---|
static class |
JarvisMarch.Points
The Points class that gets all the points who the system sends to the JarvisMarch Convex Hull realization. |
| Field Summary | |
|---|---|
static java.util.ArrayList |
arrayList
|
JarvisMarch.Points |
hullPoints
|
static JarvisMarch.Points |
pts
|
| Constructor Summary | |
|---|---|
JarvisMarch()
Creates an empty instans of the JarvisMarch |
|
JarvisMarch(JarvisMarch.Points pts)
Creates a new instance of JarvisMarch, the algorithm that calculates the Convex Hull shape of the given points. |
|
| Method Summary | |
|---|---|
int |
calculateHull()
The calculateHull function, called from the JarvisMarch, starts the calculation of the convex hull shape. |
java.util.ArrayList |
forConvex(double[] x,
double[] y)
The forConvex function, who is called from the FindIt function when that has found an area who must
be calculated from the Convex Hull and after if one or more Convex Hull shape intersects one or more other and recalculation is needed and gets
the points who are going to be calcuteted, creates a new instance of the Point class, starts the JarvisMarch algorithm and
after the calculation returns at the FindIt the convex Hull shape. |
JarvisMarch.Points |
getHullPoints()
Retern Of Hull Points |
int |
getStartingPoint()
Request and return Of The Starting Point |
static double |
pseudoAngle(double dx,
double dy)
Angle`s Calculation Bettowen Two Points Part 2 |
static double |
quadrantOnePseudoAngle(double dx,
double dy)
Angle`s Calculation Bettowen Two Points Part 3 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static JarvisMarch.Points pts
public static java.util.ArrayList arrayList
public JarvisMarch.Points hullPoints
| Constructor Detail |
|---|
public JarvisMarch()
public JarvisMarch(JarvisMarch.Points pts)
calculateHull() function that is responsible for the calculation.
pts - PointscalculateHull(),
getHullPoints()| Method Detail |
|---|
public java.util.ArrayList forConvex(double[] x,
double[] y)
forConvex function, who is called from the FindIt function when that has found an area who must
be calculated from the Convex Hull and after if one or more Convex Hull shape intersects one or more other and recalculation is needed and gets
the points who are going to be calcuteted, creates a new instance of the Point class, starts the JarvisMarch algorithm and
after the calculation returns at the FindIt the convex Hull shape.
x - double array with the x co-ordinates for all the points.y - double array with the y co-ordinates for all the points.
FindItpublic int calculateHull()
calculateHull function, called from the JarvisMarch, starts the calculation of the convex hull shape.
getStartingPoint(),
getStartingPoint(),
addToHull(int),
buildHullPoints()public int getStartingPoint()
public static double pseudoAngle(double dx,
double dy)
public static double quadrantOnePseudoAngle(double dx,
double dy)
public JarvisMarch.Points getHullPoints()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||