|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectshady.common.Point
shady.common.Point.OnSegment
public static class Point.OnSegment
A mutable point on a Segment.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class shady.common.Point |
|---|
Point.Cartesian, Point.OnSegment |
| Field Summary | |
|---|---|
AbstractSegment |
segment
The Segment, not null. |
double |
where
The location on segment (0.0->start, 1.0->end). |
| Constructor Summary | |
|---|---|
Point.OnSegment()
Make a new uninitialized OnSegment Point. |
|
Point.OnSegment(AbstractSegment segment,
double where)
Make a new point on a Segment. |
|
Point.OnSegment(Point.OnSegment p)
Copy another OnSegment point. |
|
| Method Summary | |
|---|---|
Point.OnSegment |
copy()
Return a clone(). |
Point.Cartesian |
copyInto(Point.Cartesian dest)
Covers copyIntoCartesian(shady.common.Point.Cartesian). |
Point.OnSegment |
copyInto(Point.OnSegment dest)
Covers copyIntoOnSegment(shady.common.Point.OnSegment). |
Point.Cartesian |
copyIntoCartesian(Point.Cartesian dest)
Copy into a Point.Cartesian Point. |
Point.OnSegment |
copyIntoOnSegment(Point.OnSegment dest)
Copy into an Point.OnSegment Point. |
double |
getX()
Get the Cartesian x coordinate. |
double |
getY()
Get the Cartesian y coordinate. |
Point |
invalidate()
Invalidate this Point. |
boolean |
isValid()
Check whether this Point is valid. |
Point.OnSegment |
set(AbstractSegment segment,
double where)
Set segment and where one shot. |
java.lang.String |
toString()
Convenience cover of toString(DoubleFormatter), uses no
formatter. |
java.lang.String |
toString(DoubleFormatter formatter)
Return a human-readable String representation of this Point.Point.OnSegment. |
| Methods inherited from class shady.common.Point |
|---|
distance, distanceSq, distanceSq |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public AbstractSegment segment
The Segment, not null.
public double where
The location on segment (0.0->start, 1.0->end).
| Constructor Detail |
|---|
public Point.OnSegment(AbstractSegment segment,
double where)
Make a new point on a Segment.
segment - the segment, not nullwhere - the location on segment (0.0->start, 1.0->end)public Point.OnSegment(Point.OnSegment p)
Copy another OnSegment point.
p - the point to copypublic Point.OnSegment()
Make a new uninitialized OnSegment Point.
| Method Detail |
|---|
public double getX()
Get the Cartesian x coordinate.
getX in class Pointpublic double getY()
Get the Cartesian y coordinate.
getY in class Pointpublic boolean isValid()
Check whether this Point is valid.
Default impl just checks that both coordinates are non-NaN.
isValid in class Pointpublic Point invalidate()
Invalidate this Point.
After calling this Point.isValid() will return false.
invalidate in class Pointpublic Point.OnSegment copy()
Return a clone().
public Point.OnSegment copyInto(Point.OnSegment dest)
public Point.OnSegment copyIntoOnSegment(Point.OnSegment dest)
Copy into an Point.OnSegment Point.
dest - the destination of the copy, if null a new Point.OnSegment
is consedpublic Point.Cartesian copyInto(Point.Cartesian dest)
public Point.Cartesian copyIntoCartesian(Point.Cartesian dest)
Copy into a Point.Cartesian Point.
dest - the destination of the copy, if null a new Point.Cartesian
is consedpublic java.lang.String toString(DoubleFormatter formatter)
Return a human-readable String representation of this Point.Point.OnSegment.
toString in class Pointformatter - the formatter to use, null if none
public java.lang.String toString()
Convenience cover of toString(DoubleFormatter), uses no
formatter.
toString in class Point
public Point.OnSegment set(AbstractSegment segment,
double where)
Set segment and where one shot.
segment - the segment, not nullwhere - the location on segment (0.0->start, 1.0->end)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||