edu.mit.sketch.geom
Class SpatialRelation

java.lang.Object
  |
  +--edu.mit.sketch.geom.SpatialRelation

public class SpatialRelation
extends Object

This class lists the binary spatial relations that two objects may have


Field Summary
static int ABOVE
           | | | X | ___|___|___ | | | | ___|___|___ | | | | | |
static int BELOW
           | | | | ___|___|___ | | | | ___|___|___ | | | X | | |
static int COCENTRIC
           | | | | ___|___|___ | | | X | ___|___|___ | | | | | |
static int LEFT
           | | | | ___|___|___ | | X | | ___|___|___ | | | | | |
static int LOWER_LEFT
           | | | | ___|___|___ | | | | ___|___|___ | | X | | | |
static int LOWER_RIGHT
           | | | | ___|___|___ | | | | ___|___|___ | | | | X | |
static int RIGHT
           | | | | ___|___|___ | | | | X ___|___|___ | | | | | |
static int UPPER_LEFT
           | | X | | ___|___|___ | | | | ___|___|___ | | | | | |
static int UPPER_RIGHT
           | | | | X ___|___|___ | | | | ___|___|___ | | | | | |
 
Constructor Summary
SpatialRelation()
           
 
Method Summary
static int cartesian2screen(int relation)
          To String
static int getComplement(int relation)
          To String
static int screen2cartesian(int relation)
          To String
static String toString(int relation)
          To String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UPPER_LEFT

public static final int UPPER_LEFT
             
             |   |
           X |   |
          ___|___|___
             |   |
             |   |
          ___|___|___
             |   |
             |   |
             |   |
 

ABOVE

public static final int ABOVE
             
             |   |
             | X |
          ___|___|___
             |   |
             |   |
          ___|___|___
             |   |
             |   |
             |   |
 

UPPER_RIGHT

public static final int UPPER_RIGHT
             |   |
             |   | X
          ___|___|___
             |   |
             |   |
          ___|___|___
             |   |
             |   |
             |   |
 

LEFT

public static final int LEFT
             |   |
             |   | 
          ___|___|___
             |   |
           X |   |
          ___|___|___
             |   |
             |   |
             |   |
 

COCENTRIC

public static final int COCENTRIC
             |   |
             |   | 
          ___|___|___
             |   |
             | X |
          ___|___|___
             |   |
             |   |
             |   |
 

RIGHT

public static final int RIGHT
             |   |
             |   | 
          ___|___|___
             |   |
             |   | X
          ___|___|___
             |   |
             |   |
             |   |
 

LOWER_LEFT

public static final int LOWER_LEFT
             |   |
             |   |
          ___|___|___
             |   |
             |   |
          ___|___|___
             |   |
           X |   |
             |   |
 

BELOW

public static final int BELOW
             |   |
             |   |
          ___|___|___
             |   |
             |   |
          ___|___|___
             |   |
             | X |
             |   |
 

LOWER_RIGHT

public static final int LOWER_RIGHT
             
             |   |
             |   |
          ___|___|___
             |   |
             |   |
          ___|___|___
             |   |
             |   | X
             |   |
 
Constructor Detail

SpatialRelation

public SpatialRelation()
Method Detail

toString

public static String toString(int relation)
To String

cartesian2screen

public static int cartesian2screen(int relation)
To String

screen2cartesian

public static int screen2cartesian(int relation)
To String

getComplement

public static int getComplement(int relation)
To String