bool inPolygon( Vertices polygon, Vector2 point )
{
bool inPolygon = !distanceToHullAcceptableHoles( polygon, point, true );
if( !inPolygon )
{
List<float> xCoords = searchCrossingEdgesHoles( polygon, (int)point.Y );
if( xCoords.Count > 0 && xCoords.Count % 2 == 0 )
{
for( int i = 0; i < xCoords.Count; i += 2 )
{
if( xCoords[i] <= point.X && xCoords[i + 1] >= point.X )
return true;
}
}
return false;
}
return true;
}