public static class SeaOfGatesEngine.PossibleEndpoints
extends java.lang.Object
Constructor and Description |
---|
SeaOfGatesEngine.PossibleEndpoints(double x,
double y,
FixpRectangle rect,
FixpRectangle rectGridded) |
Modifier and Type | Method and Description |
---|---|
void |
add(SeaOfGatesEngine.PossibleEndpoint pe) |
boolean |
atGoalPoint(double curX,
double curY)
Method to tell if a given coordinate is a goal point.
|
void |
finishedAddingEndpoints() |
EPoint |
getCenter() |
double |
getCenterX() |
double |
getCenterY() |
EPoint |
getClosestPoint(double curX,
double curY)
Method to return the closest endpoint to a given coordinate.
|
double |
getClosestX(double curX)
Method to return the closest X coordinate to a given value.
|
double |
getClosestY(double curY)
Method to return the closest Y coordinate to a given value.
|
double |
getDistToGoal(double curX,
double curY)
Method to return the distance to the closest goal point.
|
java.util.List<SeaOfGatesEngine.PossibleEndpoint> |
getEndpoints() |
java.lang.Double |
getGoalAboveX(double curX,
double curY)
Method to find a goal point at a Y value and above a given X value.
|
java.lang.Double |
getGoalAboveY(double curX,
double curY)
Method to find a goal point at an X value and above a given Y value.
|
java.lang.Double |
getGoalBelowX(double curX,
double curY)
Method to find a goal point at a Y value and below a given X value.
|
java.lang.Double |
getGoalBelowY(double curX,
double curY)
Method to find a goal point at an X value and below a given Y value.
|
java.lang.Double |
getGoalWithinX(double lowX,
double highX,
double curY)
Method to find a goal point in a given range of X values and at a given Y value.
|
java.lang.Double |
getGoalWithinY(double curX,
double lowY,
double highY)
Method to find a goal point in a given range of Y values and at a given X value.
|
FixpRectangle |
getGriddedRect() |
FixpRectangle |
getRect() |
boolean |
hasEndpoints() |
boolean |
isAboveX(double curX)
Method to determine whether the goal is above a given X coordinate.
|
boolean |
isAboveY(double curY)
Method to determine whether the goal is above a given Y coordinate.
|
boolean |
isBelowX(double curX)
Method to determine whether the goal is below a given X coordinate.
|
boolean |
isBelowY(double curY)
Method to determine whether the goal is below a given Y coordinate.
|
boolean |
isOnGoalAxis(double curX,
double curY)
Method to tell if a given coordinate is on one of the goal axes.
|
boolean |
isOutOfGoalX(double curX)
Method to tell if a given X coordinate is at a goal point.
|
boolean |
isOutOfGoalY(double curY)
Method to tell if a given Y coordinate is at a goal point.
|
boolean |
isToPoint(double curX,
double curY)
Method to determine if a given point is a destination point.
|
boolean |
isWithinNonzeroX(double curX,
double curY)
Method to determine if a given coordinate is on Y and within a nonzero range of X coordinates.
|
boolean |
isWithinNonzeroY(double curX,
double curY)
Method to determine if a given coordinate is on X and within a nonzero range of Y coordinates.
|
void |
setCenterX(double v) |
void |
setCenterY(double v) |
void |
setGriddedRect(double lX,
double hX,
double lY,
double hY) |
void |
setRect(double x,
double y,
double w,
double h) |
public SeaOfGatesEngine.PossibleEndpoints(double x, double y, FixpRectangle rect, FixpRectangle rectGridded)
public void setCenterX(double v)
public void setCenterY(double v)
public void setRect(double x, double y, double w, double h)
public void setGriddedRect(double lX, double hX, double lY, double hY)
public void add(SeaOfGatesEngine.PossibleEndpoint pe)
public double getCenterX()
public double getCenterY()
public EPoint getCenter()
public FixpRectangle getRect()
public FixpRectangle getGriddedRect()
public boolean hasEndpoints()
public java.util.List<SeaOfGatesEngine.PossibleEndpoint> getEndpoints()
public void finishedAddingEndpoints()
public EPoint getClosestPoint(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public boolean isToPoint(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public boolean isWithinNonzeroX(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public boolean isWithinNonzeroY(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public double getClosestX(double curX)
curX
- the given value.public double getClosestY(double curY)
curY
- the given value.public boolean isBelowX(double curX)
curX
- the given value.public boolean isAboveX(double curX)
curX
- the given value.public boolean isBelowY(double curY)
curY
- the given value.public boolean isAboveY(double curY)
curY
- the given value.public boolean atGoalPoint(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public boolean isOutOfGoalX(double curX)
curX
- the X coordinate.public boolean isOutOfGoalY(double curY)
curY
- the Y coordinate.public boolean isOnGoalAxis(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public double getDistToGoal(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public java.lang.Double getGoalWithinX(double lowX, double highX, double curY)
lowX
- the low X value.highX
- the high X value.curY
- the Y coordinate.public java.lang.Double getGoalWithinY(double curX, double lowY, double highY)
curX
- the X coordinate.lowY
- the low Y value.highY
- the high Y value.public java.lang.Double getGoalAboveX(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public java.lang.Double getGoalBelowX(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public java.lang.Double getGoalAboveY(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.public java.lang.Double getGoalBelowY(double curX, double curY)
curX
- the X coordinate.curY
- the Y coordinate.