|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.sketch.parser2d.AngleRelation
public class 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.
Field Summary | |
---|---|
static String |
NAME
The name that this relation goes by in text form. |
Constructor Summary | |
---|---|
AngleRelation(int site1,
int site2)
The sites of interest on the first and second rectangles, respectively. |
Method Summary | |
---|---|
double |
apply(SceneElement e1,
SceneElement e2)
Return the angle between the constructor-specified sites on e1 and e2, respectively. |
static void |
debug(String s)
Debugging output. |
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. |
String |
toString()
Print out the contents of this relation. |
String |
toString(String e1Name,
String e2Name)
Pretty print the relation in the grammar format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static String NAME
Constructor Detail |
---|
public AngleRelation(int site1, int site2)
Method Detail |
---|
public double apply(SceneElement e1, SceneElement e2)
apply
in interface Relation
public static void debug(String s)
public String getName()
getName
in interface Relation
public int getSite1()
public int getSite2()
public void setSite1(int site1)
public void setSite2(int site2)
public String toString(String e1Name, String e2Name)
toString
in interface Relation
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |