|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectgameComponents.UtilityCircle
public class UtilityCircle
This class encapsulates a circle, centered at the origin (0,0) that has a single point located somewhere on the circumference.
| Constructor Summary | |
|---|---|
UtilityCircle(double angularDisplacement,
double diameter)
Constructs a circle with centre point at 0,0 and whose circumference is given by the passed diameter value. |
|
UtilityCircle(java.awt.Point p1)
Constructs a circle with centre point at 0,0 and whose circumference passes through the passed point |
|
| Method Summary | |
|---|---|
void |
addPointOnCircumference(java.awt.Point p)
|
double |
getAngle()
returns the angle of the trajectory that travels through the point |
double |
getDiameter()
Returns diameter of this circle |
java.awt.Point |
getPointOnCircumference()
|
double |
getXDisplacement()
Returns x displacement of p1, as measured in a horizontal line starting at the vertical line passing through the centre point, of p1 |
double |
getYDisplacement()
Returns y displacement of p1, as measured in a vertical line starting at the horizontal line passing through the centre point, of p1 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UtilityCircle(double angularDisplacement,
double diameter)
angularDisplacement - diameter - public UtilityCircle(java.awt.Point p1)
p1 - | Method Detail |
|---|
public void addPointOnCircumference(java.awt.Point p)
public double getXDisplacement()
public double getYDisplacement()
public double getDiameter()
public double getAngle()
public java.awt.Point getPointOnCircumference()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||