|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrobocode.naval.BlindSpot
public class BlindSpot
A blind spot is used to prevent something from moving to a specified angle.
| Constructor Summary | |
|---|---|
BlindSpot(BlindSpot blindSpot)
Copy constructor for BlindSpot. |
|
BlindSpot(double start,
double extent)
Create a new blind spot. |
|
| Method Summary | |
|---|---|
double |
getBestAngle(double angle)
Deprecated. |
boolean |
getCrossZero()
This function is mostly used internally to draw the BlindSpots. |
double |
getEnd()
Returns the end of the BlindSpot in RADIANS |
double |
getExtent(double curAngle,
double destAngle)
Get the extent between two different angles. |
double |
getFarLeft()
Returns the far Left point of the BlindSpot. |
double |
getFarRight()
Returns the far Right point of the BlindSpot. |
double |
getOnlyAngle(double curAngle,
double destAngle)
Deprecated. |
double |
getRotateDirection(double curAngle,
double destAngle)
Deprecated. |
double |
getStart()
Returns the start of the BlindSpot in RADIANS |
boolean |
hasBlindSpot()
Determines whether or not there is a blind spot set. |
boolean |
inBlindSpot(double angle)
Determines if the given angle is within the blind spot. |
boolean |
isCrossingArch(double angle,
double extent)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BlindSpot(double start,
double extent)
start - The angle at which to start.extent - The angular extent of the blind arch. (Negative means left!)public BlindSpot(BlindSpot blindSpot)
blindSpot - The BlindSpot you want to copy| Method Detail |
|---|
public double getStart()
public double getEnd()
public boolean getCrossZero()
#BattleView.drawNavalBlindSpots(Graphics2D, IRobotSnapshot)public double getFarRight()
public double getFarLeft()
public boolean hasBlindSpot()
true if there is a blind arch; false otherwise.public boolean inBlindSpot(double angle)
angle - The angle, in radians, to determine from if it is inside the blind spot.
true if the angle is within the blind spot; false otherwise.
public double getExtent(double curAngle,
double destAngle)
curAngle to the destAngle.
curAngle - The current angle of the component.destAngle - The destination angle of the component.
@Deprecated public double getBestAngle(double angle)
angle - The angle, in radians, we want to rotate to.
#getRotateDirection(double)
@Deprecated
public boolean isCrossingArch(double angle,
double extent)
angle - The starting angle.extent - The amount we have to move.
true if it crosses the arch; false otherwise.
@Deprecated
public double getRotateDirection(double curAngle,
double destAngle)
curAngle - The current angle, in radians, of the component.destAngle - The angle, in radians, that has to be rotated to.
-1 (left), 0 (unknown) or 1 (right)getBestAngle(double)
@Deprecated
public double getOnlyAngle(double curAngle,
double destAngle)
angle - The angle, in radians, we want to rotate to.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||