simulation_MVC_Basic
Class UtilityCircle

java.lang.Object
  extended by simulation_MVC_Basic.UtilityCircle

public class UtilityCircle
extends java.lang.Object

This class encapsulates a circle, centered at the origin (0,0) that has a single point located somewhere on the circumference.

Author:
mb

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

UtilityCircle

public UtilityCircle(double angularDisplacement,
                     double diameter)
Constructs a circle with centre point at 0,0 and whose circumference is given by the passed diameter value. Place a point on the circumference at the specified angular displacement.

Parameters:
angularDisplacement -
diameter -

UtilityCircle

public UtilityCircle(java.awt.Point p1)
Constructs a circle with centre point at 0,0 and whose circumference passes through the passed point

Parameters:
p1 -
Method Detail

addPointOnCircumference

public void addPointOnCircumference(java.awt.Point p)

getXDisplacement

public 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

Returns:
as described above

getYDisplacement

public 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

Returns:
as described above

getDiameter

public double getDiameter()
Returns diameter of this circle

Returns:
as described above

getAngle

public double getAngle()
returns the angle of the trajectory that travels through the point

Returns:
as described above

getPointOnCircumference

public java.awt.Point getPointOnCircumference()