cs252proj.api
Interface PointLocator
- public interface PointLocator
An interface for finding the face of a graph in which a point lies.
Method Summary |
void |
execute(jdsl.map.api.InspectableEmbeddedPlanarGraph g)
Initializes the PointLocator with the given EmbeddedPlanarGraph; |
jdsl.core.api.Position |
locatePoint(jdsl.geomobj.api.Point2D point)
Finds the Position in the EmbeddedPlanarGraph on which the point
lies: may be a Face, Edge, or Vertex. |
execute
public void execute(jdsl.map.api.InspectableEmbeddedPlanarGraph g)
throws java.lang.ClassCastException
- Initializes the PointLocator with the given EmbeddedPlanarGraph;
- Parameters:
g
- an EmbeddedPlanarGraph.- Throws:
java.lang.ClassCastException
- if the EmbeddedPlanarGraph does not store
Point2Ds at its vertices.
locatePoint
public jdsl.core.api.Position locatePoint(jdsl.geomobj.api.Point2D point)
throws java.lang.IllegalStateException
- Finds the Position in the EmbeddedPlanarGraph on which the point
lies: may be a Face, Edge, or Vertex. Only guaranteed to be valid if
the graph was not modified since execute was called.
- Parameters:
point
- the point for which to search.- Returns:
- the position in the graph on which the query point lies.
- Throws:
java.lang.IllegalStateException
- if execute was not called first.