|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.geometry.Circle
public class Circle
WRITEME: Document this type.
| Field Summary | |
|---|---|
protected Coord2D |
center
WRITEME: Document this brpocock@star-hope.org |
protected double |
radius
WRITEME: Document this brpocock@star-hope.org |
| Constructor Summary | |
|---|---|
Circle(Coord2D center0,
double radius0)
Constructs a basic circle |
|
Circle(double x,
double y,
double radius0)
Constructs a basic circle |
|
| Method Summary | |
|---|---|
boolean |
contains(Coord2D coord2d)
Determines if the polygon contains that point |
boolean |
contains(double x,
double y)
Determines if the polygon contains that point |
private double |
getA(Coord2D point1,
Coord2D point2)
WRITEME: Document this method brpocock@star-hope.org |
private double |
getB(Coord2D point1,
Coord2D point2,
Coord2D cntr)
WRITEME: Document this method brpocock@star-hope.org |
private double |
getC(Coord2D point1,
Coord2D cntr,
double radius0)
WRITEME: Document this method brpocock@star-hope.org |
Coord2D |
getCenter()
|
private Coord2D |
getIntPoint(Coord2D point1,
Coord2D point2,
double u)
WRITEME: Document this method brpocock@star-hope.org |
double |
getRadius()
|
private double |
insideRoot(double a,
double b,
double c)
Finds the inside of the quadratic for intersecting a line and a circle |
Coord2D[] |
intersection(LineSeg2D lsSeg2d)
Finds the intersection points for the polygon with the line segment |
boolean |
intersects(LineSeg2D segment)
Determines if the polygon intersects the line segment |
boolean |
intersects(PolygonPrimitive<?> polygon)
Determines if this polygon intersects with another one XXX: There has to be a better way than this |
boolean |
intersectsCircle(Circle circle)
Determines if this circle intersects with another circle |
boolean |
intersectsPoly(Polygon polygon)
Determines if the polygon intersects a polygon |
boolean |
intersectsRect(Rectangle rectangle)
Tests to see if this rectangle intersects the circles |
Circle |
scale(double sizeScalar)
WRITEME: Document this method brpocock@star-hope.org |
String |
toString()
|
Circle |
translate(Coord2D coord2d)
WRITEME: Document this method brpocock@star-hope.org |
Circle |
translate(double x,
double y)
Translates the object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Coord2D center
protected final double radius
| Constructor Detail |
|---|
public Circle(Coord2D center0,
double radius0)
center0 - Coordinates of the center pointradius0 - Radius of the circle
public Circle(double x,
double y,
double radius0)
x - X coordinate of the center pointy - Y coordinate of the center pointradius0 - Radius of the circle| Method Detail |
|---|
public boolean contains(Coord2D coord2d)
PolygonPrimitive
contains in interface PolygonPrimitive<Circle>coord2d - WRITEME
PolygonPrimitive.contains(org.starhope.appius.geometry.Coord2D)
public boolean contains(double x,
double y)
PolygonPrimitive
contains in interface PolygonPrimitive<Circle>x - WRITEMEy - WRITEME
PolygonPrimitive.contains(double,
double)
private double getA(Coord2D point1,
Coord2D point2)
point1 - WRITEMEpoint2 - WRITEME
private double getB(Coord2D point1,
Coord2D point2,
Coord2D cntr)
point1 - WRITEMEpoint2 - WRITEMEcntr - WRITEME
private double getC(Coord2D point1,
Coord2D cntr,
double radius0)
point1 - WRITEMEcntr - WRITEMEradius0 - WRITEME
public Coord2D getCenter()
getCenter in interface PolygonPrimitive<Circle>
private Coord2D getIntPoint(Coord2D point1,
Coord2D point2,
double u)
point1 - WRITEMEpoint2 - WRITEMEu - WRITEME
public double getRadius()
private double insideRoot(double a,
double b,
double c)
a - where a is a of au^2 + bu + cb - where b is b of au^2 + bu + cc - where c is c of au^2 + bu + c
public Coord2D[] intersection(LineSeg2D lsSeg2d)
PolygonPrimitive
intersection in interface PolygonPrimitive<Circle>lsSeg2d - WRITEME
FIXME: This is returning grossly implausible values…public boolean intersects(LineSeg2D segment)
PolygonPrimitive
intersects in interface PolygonPrimitive<Circle>segment - WRITEME
PolygonPrimitive.intersects(org.starhope.appius.geometry.LineSeg2D)public boolean intersects(PolygonPrimitive<?> polygon)
intersects in interface PolygonPrimitive<Circle>polygon - WRITEME
public boolean intersectsCircle(Circle circle)
intersectsCircle in interface PolygonPrimitive<Circle>circle - The circle to test intersection with
public boolean intersectsPoly(Polygon polygon)
PolygonPrimitive
intersectsPoly in interface PolygonPrimitive<Circle>polygon - WRITEME
PolygonPrimitive.intersectsPoly(org.starhope.appius.geometry.Polygon)public boolean intersectsRect(Rectangle rectangle)
intersectsRect in interface PolygonPrimitive<Circle>rectangle - WRITEME
public Circle scale(double sizeScalar)
PolygonPrimitive
scale in interface PolygonPrimitive<Circle>sizeScalar - WRITEME
public String toString()
toString in class ObjectObject.toString()public Circle translate(Coord2D coord2d)
translate in interface PolygonPrimitive<Circle>coord2d - WRITEME
public Circle translate(double x,
double y)
PolygonPrimitive
translate in interface PolygonPrimitive<Circle>x - The amount to move on the x-axisy - The amount to move on the y-axis
PolygonPrimitive.translate(double,
double)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||