distanceToConstraintsPoint method
Computes the signed distance from a point to the constraints (obstacles and boundary). Points outside the boundary polygon are assigned a negative distance. Their containing cells will be last in the priority queue (but will still end up being tested since they may be refined).
@param p the point to compute the distance for @return the signed distance to the constraints (negative indicates outside the boundary)
Implementation
double distanceToConstraintsPoint(Point p) {
bool isOutide = Location.EXTERIOR == boundaryPtLocater.locate(p.getCoordinate()!);
if (isOutide) {
double boundaryDist = boundaryDistance.facetDistance(p);
return -boundaryDist;
}
double dist = obstacleDistance.distance(p);
return dist;
}