objects
Class EuArc

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

public class EuArc
extends EuCircle

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


Field Summary
 fundamentals.EuAngle inAngle
          The parameter at which the arc begins, moving counterclockwise.
 fundamentals.EuAngle outAngle
          The parameter at which the arc ends, moving counterclockwise.
 
Fields inherited from class objects.EuCircle
degenerate, radius
 
Fields inherited from class objects.EuParametrized
anchor
 
Fields inherited from class objects.EuObject
infoHash, provenience, scaledown
 
Constructor Summary
EuArc()
          Contructor for dummy object
EuArc(double x, double y, double r, double s, double t)
          The constructor does initialization.
EuArc(objects.EuArc a, objects.EuPoint p1, objects.EuPoint p2)
          The arc is instantiated as a subarc of the given arc, and with endspoints in the given points
EuArc(objects.EuCircle a, objects.EuPoint p1, objects.EuPoint p2)
          The arc is instantiated as a subarc of the given circle, and with endpoints in the given points, going counterclockwise from p1 to p2.
 
Method Summary
 fundamentals.EuVector anInnerPoint()
          Describe anInnerPoint method here.
 fundamentals.EuVector atInEnd()
          Describe atInEnd method here.
 fundamentals.EuVector atOutEnd()
          Describe atOutEnd method here.
 boolean castIdentical(objects.EuObject other)
          See if passed object can be cast to the present one.
 double closestParameter(double x, double y)
          Find the parameter value which yields the closest point to a given one.
 objects.plotCollection computeClip(fundamentals.mouseInfo info)
          Compute the visible portion of the object as a collection of arcs, intervals or points.
 boolean interiorContains(fundamentals.EuVector point)
          See if passed point lies inside the arc
protected  fundamentals.EuVector invisibleRandomPoint(fundamentals.mouseInfo info, java.util.Random croupier)
          Chooses a sensible point on the arc when the arc is invisible.
 boolean isFull()
          Describe isFull method here.
 boolean overlaps(objects.EuObject other)
          See if another object overlaps nontrivially with this one.
 java.lang.String params()
          Describe params method here.
 void passArguments(fundamentals.EuArguments args)
          Read off parameters describing the object and add to passed EuArguments instance
 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.EuCircle
atParameter, cloneMe, closestParameterOnCircle, closureContainsObject, confusionDistance, nameDisplacementAngle, nameParameter, onSameCircle, superIdentical
 
Methods inherited from class objects.EuParametrized
atParameter, atParameter, closestParameter, closureContains, distance, 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

inAngle

public fundamentals.EuAngle inAngle
The parameter at which the arc begins, moving counterclockwise. Normalized in [0,360)


outAngle

public fundamentals.EuAngle outAngle
The parameter at which the arc ends, moving counterclockwise. Normalized in [0,360)

Constructor Detail

EuArc

public EuArc(double x,
             double y,
             double r,
             double s,
             double t)
      throws DesignException,
             UserException
The constructor does initialization. A zero generator vector gives a LeaRuntimeException. A degenerate interval is handled by the warner.

Parameters:
x - the first coordinate of anchor
y - the second coordinate of anchor
r - the radius
s - the lo parameter of the endpoint
t - the hi parameter of the endpoint
Throws:
DesignException - if an error occurs
UserException - if an error occurs

EuArc

public EuArc()
Contructor for dummy object


EuArc

public EuArc(objects.EuArc a,
             objects.EuPoint p1,
             objects.EuPoint p2)
      throws UserException
The arc is instantiated as a subarc of the given arc, and with endspoints in the given points

Parameters:
a - an EuArc value
p1 - an EuPoint value
p2 - an EuPoint value
Throws:
UserException - if an error occurs

EuArc

public EuArc(objects.EuCircle a,
             objects.EuPoint p1,
             objects.EuPoint p2)
      throws UserException
The arc is instantiated as a subarc of the given circle, and with endpoints in the given points, going counterclockwise from p1 to p2.

Parameters:
a - an EuCircle value
p1 - an EuPoint value
p2 - an EuPoint value
Throws:
UserException - if an error occurs
Method Detail

atInEnd

public fundamentals.EuVector atInEnd()
Describe atInEnd method here.

Returns:
The coordinate of the point where the arc begins, moving counterclockwise.

anInnerPoint

public fundamentals.EuVector anInnerPoint()
Describe anInnerPoint method here.

Returns:
The coordinate of the point where the arc begins, moving counterclockwise.

atOutEnd

public fundamentals.EuVector atOutEnd()
Describe atOutEnd method here.

Returns:
The coordinate of the point where the arc ends, moving counterclockwise.

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.

Overrides:
computeClip in class EuCircle
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 arc when the arc is invisible.

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

castIdentical

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

Overrides:
castIdentical in class EuCircle
Parameters:
other - an EuObject value
Returns:
true if passed object is a @see EuCircle, @see EuHalf or @see EuInterval which is a subset of this one @param other the object being compared to the present one

overlaps

public boolean overlaps(objects.EuObject other)
See if another object overlaps nontrivially with this one.

Overrides:
overlaps in class EuCircle
Parameters:
other - the object being compared to the present one
Returns:
true if passed object is a @see EuCircle or @see EuArc which overlaps with this one

closestParameter

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

Overrides:
closestParameter in class EuCircle
Parameters:
x - The first coordinate of the given point
y - The second coordinate of the given point
Returns:
The parameter

interiorContains

public boolean interiorContains(fundamentals.EuVector point)
See if passed point lies inside the arc

Overrides:
interiorContains in class EuParametrized
Parameters:
point - an EuVector value
Returns:
true if passed point lies on the arc @param point the point being compared to the present arc

typeName

public char typeName()
Describe typeName method here.

Overrides:
typeName in class EuCircle
Returns:
A

isFull

public boolean isFull()
Describe isFull method here.

Overrides:
isFull in class EuCircle
Returns:
false since the item is not of subtype A_RADIUS, A_POINT, A_LINE, A_CIRCLE

params

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

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

toString

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

Overrides:
toString in class EuCircle
Returns:
A technical specification of the object

passArguments

public void passArguments(fundamentals.EuArguments args)
Read off parameters describing the object and add to passed EuArguments instance

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

toNaturalLanguage

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

Overrides:
toNaturalLanguage in class EuCircle
Parameters:
language - an int value
determined - a boolean value
Returns:
a String value