edu.gwu.geometry
Class IntersectionInfo

java.lang.Object
  |
  +--edu.gwu.geometry.IntersectionInfo

public class IntersectionInfo
extends java.lang.Object

An instance of IntersectionInfo is used to describe an intersection point, if any.


Field Summary
static int ENDPOINT_INTERSECTION
          This constant implies two coincident endpoints (not a proper intersection).
static int NO_INTERSECTION
          This constant implies no intersection was found.
static int PROPER_INTERSECTION
          This constant implies a proper intersection was found.
 
Constructor Summary
IntersectionInfo(Pointd p, Pointd q, int i)
           
 
Method Summary
 int getCode()
          Call getCode to obtain the intersection code.
 Pointd getIntersectionPoint()
          Call getIntersectionPoint to retrieve the intersection point.
 Pointd getProperIntersectionPoint()
          Calling getProperIntersectionPoint will result returning an intersection point if the intersection was proper, null otherwise.
 boolean isProperIntersection()
          Call isProperIntersection to determine whether a proper intersection occurred.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_INTERSECTION

public static final int NO_INTERSECTION
This constant implies no intersection was found.

PROPER_INTERSECTION

public static final int PROPER_INTERSECTION
This constant implies a proper intersection was found.

ENDPOINT_INTERSECTION

public static final int ENDPOINT_INTERSECTION
This constant implies two coincident endpoints (not a proper intersection).
Constructor Detail

IntersectionInfo

public IntersectionInfo(Pointd p,
                        Pointd q,
                        int i)
Method Detail

getIntersectionPoint

public Pointd getIntersectionPoint()
Call getIntersectionPoint to retrieve the intersection point.
Returns:
a Pointd value

isProperIntersection

public boolean isProperIntersection()
Call isProperIntersection to determine whether a proper intersection occurred.
Returns:
a boolean value

getProperIntersectionPoint

public Pointd getProperIntersectionPoint()
Calling getProperIntersectionPoint will result returning an intersection point if the intersection was proper, null otherwise.
Returns:
a Pointd value

getCode

public int getCode()
Call getCode to obtain the intersection code.
Returns:
an int value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object