objects
Class EuCircle

java.lang.Object
  |
  +--objects.EuObject
        |
        +--objects.EuParametrized
              |
              +--objects.EuCircle
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
EuArc

public class EuCircle
extends EuParametrized
implements java.lang.Cloneable

An instance of this class represents a circle, represented as a cartesian pair and a radius.


Field Summary
 boolean degenerate
          Describe variable degenerate here.
 fundamentals.EuReal radius
          The radius.
 
Fields inherited from class objects.EuParametrized
anchor
 
Fields inherited from class objects.EuObject
infoHash, provenience, scaledown
 
Constructor Summary
EuCircle()
          Contructor for dummy object
EuCircle(double x, double y, double r)
          This constructor does instantiates from parameters.
EuCircle(objects.EuCircle other)
          Creates a new EuCircle instance.
EuCircle(objects.EuPoint p, objects.EuRadius r)
          The circle is instantiated with center in the given point and with the given radius
 
Method Summary
 fundamentals.EuVector atParameter(double t)
          Return in a @see EuVector the coordinates of a point on the circle at a given angle.
 boolean castIdentical(objects.EuObject other)
          See if passed object can be cast to the present one.
 objects.EuCircle cloneMe()
          Describe cloneMe method here.
 double closestParameter(double x, double y)
          Find the parameter value which yields the closest point to a given one.
 double closestParameterOnCircle(double x, double y)
          Describe closestParameterOnCircle method here.
 boolean closureContainsObject(objects.EuObject other)
          Describe closureContainsObject method here.
 objects.plotCollection computeClip(fundamentals.mouseInfo info)
          Compute the visible portion of the object as a collection of arcs, intervals or points.
 double confusionDistance(objects.EuObject other)
          Returns the distance from this object to another under these simplifications: The distance to lines or circles is in {0,POSITIVE_INFINITY} unless this is a point.
protected  fundamentals.EuVector invisibleRandomPoint(fundamentals.mouseInfo info, java.util.Random croupier)
          Chooses a sensible point on the circle when the circle is invisible.
 boolean isFull()
          Describe isFull method here.
 double nameDisplacementAngle(fundamentals.mouseInfo info)
          Describe nameDisplacementAngle method here.
 double nameParameter(fundamentals.mouseInfo info)
          Describe nameParameter method here.
protected  boolean onSameCircle(objects.EuCircle other)
          Describe onSameCircle method here.
 boolean overlaps(objects.EuObject other)
          Acts identically to @see castIdentical()
 java.lang.String params()
          Describe params method here.
 void passArguments(fundamentals.EuArguments args)
          Describe passArguments method here.
 boolean superIdentical(objects.EuObject other)
          See if passed object can be cast to the present one.
 java.lang.String toNaturalLanguage(int language, boolean determined)
          Describe toNaturalLanguage method here.
 java.lang.String toString()
          Describe toString method here.
 char typeName()
          Describe typeName method here.
 
Methods inherited from class objects.EuParametrized
atParameter, atParameter, closestParameter, closureContains, distance, interiorContains, matchingPair, nameLocation, randomPoint
 
Methods inherited from class objects.EuObject
cloneObject, draw, equals, getClip, isVisible, mouseVicinity, mouseVicinity, toPs
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

radius

public fundamentals.EuReal radius
The radius.


degenerate

public boolean degenerate
Describe variable degenerate here.

Constructor Detail

EuCircle

public EuCircle(double x,
                double y,
                double r)
         throws DesignException,
                UserException
This constructor does instantiates from parameters. A zero radius gives a Warning, a negative radius a LeaRuntimeException

Parameters:
x - the first coordinate of anchor
y - the second coordinate of anchor
r - the radius
Throws:
DesignException - if an error occurs
UserException - if an error occurs

EuCircle

public EuCircle(objects.EuCircle other)
Creates a new EuCircle instance.

Parameters:
other - an EuCircle value

EuCircle

public EuCircle()
Contructor for dummy object


EuCircle

public EuCircle(objects.EuPoint p,
                objects.EuRadius r)
The circle is instantiated with center in the given point and with the given radius

Parameters:
p - an EuPoint value
r - an EuRadius value
Method Detail

atParameter

public fundamentals.EuVector atParameter(double t)
Return in a @see EuVector the coordinates of a point on the circle at a given angle.

Specified by:
atParameter in class EuParametrized
Parameters:
t - a double value
Returns:
the coordinates @param t the parameter

closestParameter

public double closestParameter(double x,
                               double y)
Find the parameter value which yields the closest point to a given one.

Specified by:
closestParameter in class EuParametrized
Parameters:
x - the first coordinate of the point
y - the second coordinate of the point
Returns:
The parameter

closestParameterOnCircle

public double closestParameterOnCircle(double x,
                                       double y)
Describe closestParameterOnCircle method here.

Parameters:
x - a double value
y - a double value
Returns:
a double value

computeClip

public objects.plotCollection computeClip(fundamentals.mouseInfo info)
                                   throws InternalException,
                                          DesignException,
                                          UserException
Compute the visible portion of the object as a collection of arcs, intervals or points.

Specified by:
computeClip in class EuObject
Parameters:
info - information used in scaling and positioning the object
Returns:
a plotCollection value
Throws:
InternalException - if an error occurs
DesignException - if an error occurs
UserException - if an error occurs

invisibleRandomPoint

protected fundamentals.EuVector invisibleRandomPoint(fundamentals.mouseInfo info,
                                                     java.util.Random croupier)
                                              throws UserException
Chooses a sensible point on the circle when the circle is invisible.

Specified by:
invisibleRandomPoint in class EuParametrized
Parameters:
info - a mouseInfo value
croupier - a Random value
Returns:
an EuVector value
Throws:
UserException - if an error occurs

onSameCircle

protected boolean onSameCircle(objects.EuCircle other)
Describe onSameCircle method here.

Parameters:
other - an EuCircle value
Returns:
a boolean value

castIdentical

public boolean castIdentical(objects.EuObject other)
See if passed object can be cast to the present one.

Specified by:
castIdentical in class EuObject
Parameters:
other - the object being compared to the present one
Returns:
true if passed object is a @see EuCircle or @see EuArc which is a subset of this one

superIdentical

public boolean superIdentical(objects.EuObject other)
See if passed object can be cast to the present one.

Parameters:
other - an EuObject value
Returns:
true if passed object is a @see EuLine, @see EuHalf or
See Also:
which is a subset of this one @param other the object being compared to the present one

overlaps

public boolean overlaps(objects.EuObject other)
Acts identically to @see castIdentical()

Specified by:
overlaps in class EuObject
Parameters:
other - the object being compared to the present one
Returns:
true if passed object is a @see EuCircle or @see EuArc which is a subset of this one

closureContainsObject

public boolean closureContainsObject(objects.EuObject other)
Describe closureContainsObject method here.

Parameters:
other - the other object being compared to the present circle
Returns:
true if passed object is a subset of the circle.

confusionDistance

public double confusionDistance(objects.EuObject other)
Returns the distance from this object to another under these simplifications: The distance to lines or circles is in {0,POSITIVE_INFINITY} unless this is a point. The distance to radii is POSITIVE_INFINITY unless this is a radius The distance to points is POSITIVE_INFINITY if this is a radius

Overrides:
confusionDistance in class EuParametrized
Parameters:
other - an EuObject value
Returns:
the parameter or zero

typeName

public char typeName()
Describe typeName method here.

Specified by:
typeName in class EuObject
Returns:
C

isFull

public boolean isFull()
Describe isFull method here.

Specified by:
isFull in class EuObject
Returns:
true since the item is of subtype A_RADIUS, A_POINT, A_LINE, A_CIRCLE

params

public java.lang.String params()
Describe params method here.

Overrides:
params in class EuParametrized
Returns:
A technical specification of parameters associated to the object

toString

public java.lang.String toString()
Describe toString method here.

Specified by:
toString in class EuObject
Returns:
A technical specification of the object

cloneMe

public objects.EuCircle cloneMe()
Describe cloneMe method here.

Returns:
an EuCircle value

passArguments

public void passArguments(fundamentals.EuArguments args)
Describe passArguments method here.

Overrides:
passArguments in class EuParametrized
Parameters:
args - an EuArguments value

toNaturalLanguage

public java.lang.String toNaturalLanguage(int language,
                                          boolean determined)
Describe toNaturalLanguage method here.

Specified by:
toNaturalLanguage in class EuObject
Parameters:
language - an int value
determined - a boolean value
Returns:
a String value

nameParameter

public double nameParameter(fundamentals.mouseInfo info)
Describe nameParameter method here.

Specified by:
nameParameter in class EuParametrized
Parameters:
info - a mouseInfo value
Returns:
a double value

nameDisplacementAngle

public double nameDisplacementAngle(fundamentals.mouseInfo info)
Describe nameDisplacementAngle method here.

Specified by:
nameDisplacementAngle in class EuObject
Parameters:
info - a mouseInfo value
Returns:
a double value