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

Variable Index

 o DONE
 o LOOPERR
 o NOXERR
 o OK
 o ang1P_
 o ang2P_
 o curPt1_
 o curPt2_

Constructor Index

 o XEngine()

Method Index

 o buildXsect()
 o computeCHinit()
Returns false if the polygons don't have enough points (min 3 each)
 o computeCHstep()
Returns true when CH is found.
 o computeNextXSection()
Returns TRUE if a next intersection was computed, or false if there are no more intersections (or there are no intersections at all).
 o getCurPocketPos()
 o getCurPocketSz()
Returns square bbox of last xsection.
 o 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.
 o getPoint(int)
 o initTriang()
 o mouseCancel()
 o mouseDown(double, double)
 o mouseDrag(double, double)
 o mouseUp(double, double)
 o rebuildPolygon(Polygon)
 o reset()
 o resetTriang()
 o setMode(int)
 o xSectionBuilt()

Variables

 o DONE
  public final static int DONE
 o OK
  public final static int OK
 o LOOPERR
  public final static int LOOPERR
 o NOXERR
  public final static int NOXERR
 o ang1P_
  public double ang1P_
 o ang2P_
  public double ang2P_
 o curPt1_
  public Point curPt1_
 o curPt2_
  public Point curPt2_

Constructors

 o XEngine
  public XEngine()

Methods

 o reset
  public final void reset()
 o setMode
  public final void setMode(int mode)
 o mouseDown
  public void mouseDown(double x,
                        double y)
 o mouseDrag
  public void mouseDrag(double x,
                        double y)
 o mouseUp
  public void mouseUp(double x,
                      double y)
 o mouseCancel
  public void mouseCancel()
 o 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.
 o getPoint
  public Point getPoint(int i)
 o rebuildPolygon
  protected void rebuildPolygon(Polygon p)
 o computeCHinit
  public boolean computeCHinit()
Returns false if the polygons don't have enough points (min 3 each)
 o 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.
 o resetTriang
  public void resetTriang()
 o initTriang
  public boolean initTriang()
 o getCurPocketPos
  public Point getCurPocketPos()
 o getCurPocketSz
  public double getCurPocketSz()
Returns square bbox of last xsection.
 o 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).
 o buildXsect
  public boolean buildXsect()
 o xSectionBuilt
  public boolean xSectionBuilt()

All Packages  Class Hierarchy  This Package  Previous  Next  Index