All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class objects.EuHalf

java.lang.Object
   |
   +----objects.EuObject
           |
           +----objects.EuPoint
                   |
                   +----objects.EuLine
                           |
                           +----objects.EuHalf

public class EuHalf
extends EuLine
An instance of this class represents a half-line, represented as a line using @see EuLine, along with an endpoint and a direction.


Constructor Index

 o EuHalf(double, double, double, double, double, int)
The constructor does initialization.

Method Index

 o atEnd()
 o castIdentical(EuObject)
See if passed object can be cast to the present one.
 o closureContains(EuVector)
See if passed point lies on the half-line.
 o draw(Graphics, mouseInfo)
Draw the halfline, using the
 o interiorContains(EuVector)
See if passed point lies inside the half-line.
 o mouseVicinity(mouseVector, mouseInfo)
See if mouse position is close to this line.
 o myFullShadow()
 o overlaps(EuObject)
See if objects overlap.
 o setShadow(int)
Sets the
 o subType()

Constructors

 o EuHalf
 public EuHalf(double x,
               double y,
               double deltax,
               double deltay,
               double t,
               int sign) throws LeaRuntimeException
The constructor does initialization. A zero generator vector or a zero sign gives a LeaRuntimeException

Parameters:
x - the first coordinate of anchor
y - the second coordinate of anchor
deltax - the first coordinate of generator
deltay - the second coordinate of generator
t - the parameter of the endpoint
sign - the direction (@see direction)

Methods

 o atEnd
 public EuWorkVector atEnd()
Returns:
The point at the end of the half-line
 o draw
 public void draw(Graphics g,
                  mouseInfo info)
Draw the halfline, using the @see mouseInfo for scaling and positioning.

Parameters:
g - the Graphics handle on the window
info - information used in positioning the object
Overrides:
draw in class EuLine
 o castIdentical
 public boolean castIdentical(EuObject other)
See if passed object can be cast to the present one.

Parameters:
other - the object being compared to the present one
Returns:
true if passed object is a @see EuLine which is identical to this one
Overrides:
castIdentical in class EuLine
 o mouseVicinity
 public boolean mouseVicinity(mouseVector mouseAt,
                              mouseInfo info)
See if mouse position is close to this line.

Parameters:
mouseAt - The coordinates of the mouse position
info - information used in locating the object on screen
Returns:
true if the mouse is close to the line.
Overrides:
mouseVicinity in class EuPoint
 o overlaps
 public boolean overlaps(EuObject other)
See if objects overlap.

Parameters:
other - the object being compared to the present one
Returns:
true if passed object is a @see EuLine, @see EuHalf or @see EuInterval which overlaps with this one
Overrides:
overlaps in class EuLine
 o interiorContains
 public boolean interiorContains(EuVector point)
See if passed point lies inside the half-line.

Parameters:
point - the point being compared to the present half-line
Returns:
true if passed point lies on the half-line.
Overrides:
interiorContains in class EuLine
 o closureContains
 public boolean closureContains(EuVector point)
See if passed point lies on the half-line.

Parameters:
point - the point being compared to the present half-line
Returns:
true if passed point lies on the half-line.
Overrides:
closureContains in class EuLine
 o subType
 public int subType()
Returns:
@see A_HALF
Overrides:
subType in class EuLine
 o myFullShadow
 public int myFullShadow()
Returns:
a shadow for this object as recorded in @see shadow
Overrides:
myFullShadow in class EuLine
 o setShadow
 public void setShadow(int i)
Sets the @see EuLab number of the full object behind the present one.

Returns:
i the EuLab index
Overrides:
setShadow in class EuLine

All Packages  Class Hierarchy  This Package  Previous  Next  Index