|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ProGAL.geom2d.Line
public class Line
Constructor Summary | |
---|---|
Line(double a,
double b,
double c)
creates a line ax + by + c = 0 |
|
Line(LineSegment seg)
creates a line through a given segment |
|
Line(Point p,
Point q)
creates a line through 2 given points |
|
Line(Point p,
Vector n)
creates a line through a given point and with a given normal vector |
Method Summary | |
---|---|
static boolean |
areParallel(Line l1,
Line l2)
|
Point |
getCenter()
Get the geometric center of the shape. |
Vector |
getDirection()
|
double |
getDistance(Point q)
returns the distance of the point q to the line |
static Point |
getIntersection(Line l1,
Line l2)
|
Point |
getPoint(double d)
returns the point on the line at distance d from the line-defining point p |
double |
getSlope()
|
double |
intersectionParameter(Line l)
|
boolean |
isParallelWith(Line l)
|
boolean |
isVertical()
|
double |
projectionParameter(Point q)
|
Point |
projectPoint(Point q)
|
void |
toConsole()
|
void |
toConsole(java.lang.String name)
|
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Line(Point p, Vector n)
public Line(Point p, Point q)
public Line(LineSegment seg)
public Line(double a, double b, double c)
Method Detail |
---|
public Vector getDirection()
public double getSlope()
public boolean isVertical()
public boolean isParallelWith(Line l)
public static boolean areParallel(Line l1, Line l2)
public Point projectPoint(Point q)
public double projectionParameter(Point q)
public static Point getIntersection(Line l1, Line l2)
public java.lang.String toString(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
public void toConsole(java.lang.String name)
public void toConsole()
public Point getPoint(double d)
public double getDistance(Point q)
public double intersectionParameter(Line l)
public Point getCenter()
Shape
getCenter
in interface Shape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |