|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.geom.Point2D
com.sun.electric.database.geometry.EPoint
public final class EPoint
The EPoint immutable class defines a point representing
a location in (x, y) coordinate space. This class extends abstract
class Point2D. This class is used in Electric database.
Coordiates are snapped to grid according to DBMath.round method.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom.Point2D |
|---|
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float |
| Field Summary | |
|---|---|
static EPoint |
ORIGIN
EPoint with both zero coordinates. |
| Constructor Summary | |
|---|---|
EPoint(double lambdaX,
double lambdaY)
Constructs and initializes a EPoint with the
specified coordinates in lambda units snapped to the grid. |
|
| Method Summary | |
|---|---|
boolean |
equals(EPoint that)
Returns true if this EPoint is equal to the other EPoint. |
static EPoint |
fromGrid(long gridX,
long gridY)
Returns EPoint with specified grid coordinates. |
static EPoint |
fromLambda(double lambdaX,
double lambdaY)
Returns EPoint with specified grid coordinates. |
long |
getGridX()
Returns the X coordinate of this EPoint
in grid units in long precision. |
long |
getGridY()
Returns the Y coordinate of this EPoint
in grid units in long precision. |
double |
getLambdaX()
Returns the X coordinate of this EPoint
in lambda units in double precision. |
double |
getLambdaY()
Returns the Y coordinate of this EPoint
in lambda units in double precision. |
double |
getX()
Returns the X coordinate of this EPoint
in lambda units in double precision. |
double |
getY()
Returns the Y coordinate of this EPoint
in lambda unuts in double precision. |
double |
gridDistance(EPoint pt)
Returns the distance from this EPoint to a
specified EPoint in grid units. |
java.awt.geom.Point2D.Double |
gridMutable()
Creates mutable Point2D.Double from the EPoint in grid units. |
boolean |
isSmall()
Returns true if both coordinates of this EPoint are "small ints". |
double |
lambdaDistance(EPoint pt)
Returns the distance from this EPoint to a
specified EPoint in lambda units. |
java.awt.geom.Point2D.Double |
lambdaMutable()
Creates mutable Point2D.Double from the EPoint in lambda units. |
static void |
printStatistics()
Prints statistics about EPoint objects. |
void |
setLocation(double x,
double y)
This method overrides Point2D.setLocation method. |
static EPoint |
snap(java.awt.geom.Point2D p)
Returns EPoint from specified Point2D
snapped to the grid. |
java.lang.String |
toString()
Returns a String that represents the value
of this EPoint. |
| Methods inherited from class java.awt.geom.Point2D |
|---|
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final EPoint ORIGIN
| Constructor Detail |
|---|
public EPoint(double lambdaX,
double lambdaY)
EPoint with the
specified coordinates in lambda units snapped to the grid.
lambdaX - the x-coordinate to which to set the newly
constructed EPoint in lambda units.lambdaY - the y-coordinate to which to set the newly
constructed EPoint in lambda units.| Method Detail |
|---|
public static EPoint fromLambda(double lambdaX,
double lambdaY)
EPoint with specified grid coordinates.
lambdaX - the x-coordinate in lambda units.lambdaY - the y-coordinate in lambda units.
public static EPoint fromGrid(long gridX,
long gridY)
EPoint with specified grid coordinates.
gridX - the x-coordinate in grid units.gridY - the y-coordinate in grid units.
public static EPoint snap(java.awt.geom.Point2D p)
EPoint from specified Point2D
snapped to the grid.
p - specified Point2D
public double getX()
EPoint
in lambda units in double precision.
getX in class java.awt.geom.Point2DEPoint.public double getY()
EPoint
in lambda unuts in double precision.
getY in class java.awt.geom.Point2DEPoint.public double getLambdaX()
EPoint
in lambda units in double precision.
EPoint.public double getLambdaY()
EPoint
in lambda units in double precision.
EPoint.public long getGridX()
EPoint
in grid units in long precision.
EPoint.public long getGridY()
EPoint
in grid units in long precision.
EPoint.
public void setLocation(double x,
double y)
Point2D.setLocation method.
It throws UnsupportedOperationException.
setLocation in class java.awt.geom.Point2Dx - the x-coordinate to which to set this EPointy - the y-coordinate to which to set this EPoint
java.lang.UnsupportedOperationExceptionpublic java.awt.geom.Point2D.Double lambdaMutable()
Point2D.Double from the EPoint in lambda units.
public java.awt.geom.Point2D.Double gridMutable()
Point2D.Double from the EPoint in grid units.
public double lambdaDistance(EPoint pt)
EPoint to a
specified EPoint in lambda units.
pt - the specified EPoint
EPoint and
the specified Point in lambdaUnits.public double gridDistance(EPoint pt)
EPoint to a
specified EPoint in grid units.
pt - the specified EPoint
EPoint and
the specified Point in gridUnits.public boolean isSmall()
GenMath.MIN_SMALL_COORD,
GenMath.MAX_SMALL_COORDpublic boolean equals(EPoint that)
equals,
but it could be a little faster, because no virtual method dispatching is required.
Point2D.equals(java.lang.Object)public java.lang.String toString()
String that represents the value
of this EPoint.
toString in class java.lang.ObjectEPoint.public static void printStatistics()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||