|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--diva.sketch.parser2d.DirectedRelation | +--diva.sketch.parser2d.AngleRelation
Calculate the direction angle (between 0 and 2*PI) between user-specified sites on a pair of rectangles. The angle is given relative to an "origin" rectangle, which is specified by the which parameter of the relation.
Fields inherited from class diva.sketch.parser2d.DirectedRelation |
FIRST_RECT,
SECOND_RECT |
Constructor Summary | |
AngleRelation(int which)
Use the center sites to calculate the relation, by default. |
|
AngleRelation(int which,
int site1,
int site2)
The sites of interest on the first and second rectangles, respectively. |
Method Summary | |
double |
apply(java.awt.geom.Rectangle2D r1,
java.awt.geom.Rectangle2D r2)
Return the angle between the constructor-specified sites on r1 and r2, respectively. |
static void |
debug(java.lang.String s)
Debugging output. |
java.lang.String |
getName()
The name of this relation. |
int |
getSite1()
Get the site for the first rectangle. |
int |
getSite2()
Get the site for the second rectangle. |
void |
setSite1(int site1)
Set the site for the first rectangle. |
void |
setSite2(int site2)
Set the site for the second rectangle. |
java.lang.String |
toString()
Print out the contents of this relation. |
Methods inherited from class diva.sketch.parser2d.DirectedRelation |
getWhich,
parseWhich,
printWhich,
setWhich |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public AngleRelation(int which)
AngleRelation(int, int, int)
public AngleRelation(int which, int site1, int site2)
Method Detail |
public double apply(java.awt.geom.Rectangle2D r1, java.awt.geom.Rectangle2D r2)
public static void debug(java.lang.String s)
public java.lang.String getName()
public int getSite1()
public int getSite2()
public void setSite1(int site1)
public void setSite2(int site2)
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |