|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.DT.DT_Point
This class represents a point in two dimensions, where the coordinates of the point are ints. It is immutable.
Constructor Summary | |
DT_Point(hypercast.DT.DT_Point p)
|
|
DT_Point(int xx,
int yy)
|
|
DT_Point(java.lang.String s)
Reads coordinates from string in format "\d+,\d+". |
Method Summary | |
static double |
angleRelative(hypercast.DT.DT_Point reference,
hypercast.DT.DT_Point pivot,
hypercast.DT.DT_Point datum)
|
static double |
angleToHorizon(hypercast.DT.DT_Point pivot,
hypercast.DT.DT_Point datum)
Returns the angle (in radians) of datum to horizontal ray going from the pivot in the positive x direction. |
static double |
distance(hypercast.DT.DT_Point a,
hypercast.DT.DT_Point b)
Returns the euclidean distance between two points. |
boolean |
equals(java.lang.Object o)
Compares a DT_Point to another object. |
static hypercast.DT.DT_DoublePoint |
findCenterOfCircle(hypercast.DT.DT_Point a,
hypercast.DT.DT_Point b,
hypercast.DT.DT_Point c)
Find the center of the circle inscribing 3 points. |
int |
getX()
|
int |
getY()
|
static boolean |
greaterThan(hypercast.DT.DT_Point a,
hypercast.DT.DT_Point b)
Returns true if DT_Point a comes before b in
the total ordering of points. |
int |
hashCode()
Overrides Object.hashCode so that this can be used as a key in a hashtable. |
static boolean |
isInCircle(hypercast.DT.DT_Point a,
hypercast.DT.DT_Point b,
hypercast.DT.DT_Point c,
hypercast.DT.DT_Point datum)
|
static boolean |
isInOrOnCircle(hypercast.DT.DT_Point a,
hypercast.DT.DT_Point b,
hypercast.DT.DT_Point c,
hypercast.DT.DT_Point datum)
|
static boolean |
isOnCircle(hypercast.DT.DT_Point a,
hypercast.DT.DT_Point b,
hypercast.DT.DT_Point c,
hypercast.DT.DT_Point datum)
|
java.lang.String |
toString()
Creates a string following the in x-coordinate,y-coordinate fashion. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DT_Point(int xx, int yy)
public DT_Point(hypercast.DT.DT_Point p)
public DT_Point(java.lang.String s)
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int getX()
public int getY()
public static final boolean greaterThan(hypercast.DT.DT_Point a, hypercast.DT.DT_Point b)
a
comes before b
in
the total ordering of points. A point is greater than another point if its y-coordinate
is greater or if the y-coordinates are the same and its x-coordinate is greater.
public static double distance(hypercast.DT.DT_Point a, hypercast.DT.DT_Point b)
public static double angleToHorizon(hypercast.DT.DT_Point pivot, hypercast.DT.DT_Point datum)
public static double angleRelative(hypercast.DT.DT_Point reference, hypercast.DT.DT_Point pivot, hypercast.DT.DT_Point datum)
public static boolean isOnCircle(hypercast.DT.DT_Point a, hypercast.DT.DT_Point b, hypercast.DT.DT_Point c, hypercast.DT.DT_Point datum)
public static boolean isInCircle(hypercast.DT.DT_Point a, hypercast.DT.DT_Point b, hypercast.DT.DT_Point c, hypercast.DT.DT_Point datum)
public static boolean isInOrOnCircle(hypercast.DT.DT_Point a, hypercast.DT.DT_Point b, hypercast.DT.DT_Point c, hypercast.DT.DT_Point datum)
public static hypercast.DT.DT_DoublePoint findCenterOfCircle(hypercast.DT.DT_Point a, hypercast.DT.DT_Point b, hypercast.DT.DT_Point c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |