Class ep.cg.XEngine
All Packages Class Hierarchy This Package Previous Next Index
Class ep.cg.XEngine
java.lang.Object
|
+----ep.cg.XEngine
- public class XEngine
- extends Object
- implements ModeConstants
-
DONE
-
-
LOOPERR
-
-
NOXERR
-
-
OK
-
-
ang1P_
-
-
ang2P_
-
-
curPt1_
-
-
curPt2_
-
-
XEngine()
-
-
buildXsect()
-
-
computeCHinit()
- Returns false if the polygons don't have enough points (min 3 each)
-
computeCHstep()
- Returns true when CH is found.
-
computeNextXSection()
- Returns TRUE if a next intersection was computed,
or false if there are no more intersections (or there are
no intersections at all).
-
getCurPocketPos()
-
-
getCurPocketSz()
- Returns square bbox of last xsection.
-
getNbPoints()
- Return the total number of points, not accounting for the fact
that most points on the intersection polygon will be repeated
in the two original polygons.
-
getPoint(int)
-
-
initTriang()
-
-
mouseCancel()
-
-
mouseDown(double, double)
-
-
mouseDrag(double, double)
-
-
mouseUp(double, double)
-
-
rebuildPolygon(Polygon)
-
-
reset()
-
-
resetTriang()
-
-
setMode(int)
-
-
xSectionBuilt()
-
DONE
public final static int DONE
OK
public final static int OK
LOOPERR
public final static int LOOPERR
NOXERR
public final static int NOXERR
ang1P_
public double ang1P_
ang2P_
public double ang2P_
curPt1_
public Point curPt1_
curPt2_
public Point curPt2_
XEngine
public XEngine()
reset
public final void reset()
setMode
public final void setMode(int mode)
mouseDown
public void mouseDown(double x,
double y)
mouseDrag
public void mouseDrag(double x,
double y)
mouseUp
public void mouseUp(double x,
double y)
mouseCancel
public void mouseCancel()
getNbPoints
public int getNbPoints()
- Return the total number of points, not accounting for the fact
that most points on the intersection polygon will be repeated
in the two original polygons.
getPoint
public Point getPoint(int i)
rebuildPolygon
protected void rebuildPolygon(Polygon p)
computeCHinit
public boolean computeCHinit()
- Returns false if the polygons don't have enough points (min 3 each)
computeCHstep
public int computeCHstep()
- Returns true when CH is found.
Check if we're back past 0, we're in trouble..
Rather than a boolean, we should return an int that indicates
status, and corresponds to static constants.
- Returns:
- XEngine.DONE if the convex hull is found
XEngine.OK if the step has been done without errors
XEngine.LOOPERR if it has been detected that one poly is
inside the other.
resetTriang
public void resetTriang()
initTriang
public boolean initTriang()
getCurPocketPos
public Point getCurPocketPos()
getCurPocketSz
public double getCurPocketSz()
- Returns square bbox of last xsection.
computeNextXSection
public int computeNextXSection()
- Returns TRUE if a next intersection was computed,
or false if there are no more intersections (or there are
no intersections at all).
buildXsect
public boolean buildXsect()
xSectionBuilt
public boolean xSectionBuilt()
All Packages Class Hierarchy This Package Previous Next Index