Modifier and Type | Field and Description |
---|---|
static String |
NAME
The name that this relation goes by in text form.
|
Constructor and Description |
---|
DistanceRelation(int site1,
int site2)
Calculate the euclidean distance between the given sites on two
input rectangles.
|
Modifier and Type | Method and Description |
---|---|
double |
apply(SceneElement e1,
SceneElement e2)
Return the distance between the constructor-specified sites on
r1 and r2, 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.
|
public static String NAME
public DistanceRelation(int site1, int site2)
public double apply(SceneElement e1, SceneElement e2)
public static void debug(String s)
public String getName()
public int getSite1()
public int getSite2()
public void setSite1(int site1)
public void setSite2(int site2)
public String toString(String e1Name, String e2Name)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.