|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ProGAL.geom2d.LineSegment
public class LineSegment
Constructor Summary | |
---|---|
LineSegment(Point a,
Point b)
|
Method Summary | |
---|---|
LineSegment |
clone()
|
double |
distance(Point p)
|
Point |
getA()
|
Point |
getB()
|
Point |
getCenter()
Get the geometric center of the shape. |
double |
getLength()
returns the length of the line segment |
double |
getSquaredLength()
returns the squared length of the segment |
boolean |
intersects(LineSegment s)
returns TRUE if this line segment properly intersects line segment s. |
LineSegment |
reverse()
swaps the end-points of this segment |
void |
setA(Point p)
|
void |
setB(Point p)
|
void |
toConsole()
|
void |
toScene(J2DScene scene)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LineSegment(Point a, Point b)
Method Detail |
---|
public Point getA()
public Point getB()
public void setA(Point p)
public void setB(Point p)
public double getLength()
public double getSquaredLength()
public LineSegment clone()
clone
in class java.lang.Object
public Point getCenter()
Shape
getCenter
in interface Shape
public LineSegment reverse()
public boolean intersects(LineSegment s)
public java.lang.String toString()
toString
in class java.lang.Object
public void toConsole()
public void toScene(J2DScene scene)
public double distance(Point p)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |