All Packages Class Hierarchy This Package Previous Next Index
Class objects.EuLine
java.lang.Object
|
+----objects.EuObject
|
+----objects.EuPoint
|
+----objects.EuLine
- public class EuLine
- extends EuPoint
An instance of this class represents a line, represented as two cartesian pairs.
-
generator
- A generating vector of the line.
-
EuLine(double, double, double, double)
- The constructor does initialization.
-
atParameter(double)
- Return in a
-
castIdentical(EuObject)
- See if passed object can be cast to the present one.
-
closestParameter(double, double)
- Find the parameter value which yields the closest point to
a given one.
-
closestParameter(EuVector)
-
-
closureContains(EuVector)
- See if passed point lies on the line.
-
draw(Graphics, mouseInfo)
- Draw the line, using the
-
drawTheLine(Graphics, mouseVector, mouseVector)
-
-
interiorContains(EuVector)
- See if passed point lies on the line.
-
matchingPair(EuVector, EuVector, EuVector, EuVector)
-
-
MouseVicinity(mouseVector, mouseInfo)
- See if mouse position is close to this line.
-
myFullShadow()
-
-
overlaps(EuObject)
- Acts identically to
-
setShadow(int)
- Sets the
-
subType()
-
-
type()
-
generator
public EuVector generator
- A generating vector of the line. Is normalized to be a unit vector.
EuLine
public EuLine(double x,
double y,
double deltax,
double deltay) throws LeaRuntimeException
- The constructor does initialization. A zero generator vector 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
atParameter
public EuWorkVector atParameter(double t)
- Return in a @see EuWorkVector the coordinates of a point on the line at a
given generator.
- Parameters:
- t - the parameter
- Returns:
- the coordinates
- Overrides:
- atParameter in class EuPoint
closestParameter
protected double closestParameter(double x,
double y)
- Find the parameter value which yields the closest point to
a given one.
- Parameters:
- x - The first coordinate of the given point
- y - The second coordinate of the given point
- Returns:
- The parameter
closestParameter
protected double closestParameter(EuVector v)
drawTheLine
protected void drawTheLine(Graphics g,
mouseVector pointA,
mouseVector pointB)
draw
public void draw(Graphics g,
mouseInfo info)
- Draw the line, 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 EuPoint
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, @see EuHalf or @see EuInterval
which is a subset of this one
- Overrides:
- castIdentical in class EuPoint
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.
overlaps
public boolean overlaps(EuObject other)
- Acts identically to @see castIdentical()
- 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 is a subset of this one
- Overrides:
- overlaps in class EuPoint
interiorContains
public boolean interiorContains(EuVector point)
- See if passed point lies on the line.
- Parameters:
- point - the point being compared to the present line
- Returns:
- true if passed point lies on the line.
- Overrides:
- interiorContains in class EuPoint
closureContains
public boolean closureContains(EuVector point)
- See if passed point lies on the line.
- Parameters:
- point - the point being compared to the present line
- Returns:
- true if passed point lies on the line.
- Overrides:
- closureContains in class EuPoint
type
public int type()
- Returns:
- @see LINE
- Overrides:
- type in class EuPoint
subType
public int subType()
- Returns:
- @see A_LINE
- Overrides:
- subType in class EuPoint
myFullShadow
public int myFullShadow()
- Returns:
- -1 as this object is full.
- Overrides:
- myFullShadow in class EuPoint
matchingPair
protected boolean matchingPair(EuVector a,
EuVector b,
EuVector c,
EuVector d)
- Overrides:
- matchingPair in class EuPoint
setShadow
public void setShadow(int i)
- Sets the @see EuLab number of the full object behind the present one.
- Returns:
- i the EuLab index (ignored)
- Overrides:
- setShadow in class EuPoint
All Packages Class Hierarchy This Package Previous Next Index