bool searchHullEntrance( out Vector2 entrance )
{
// Search for first solid pixel.
for( int y = 0; y <= _height; y++ )
{
for( int x = 0; x <= _width; x++ )
{
if( isSolid( ref x, ref y ) )
{
entrance = new Vector2( x, y );
return true;
}
}
}
// If there are no solid pixels.
entrance = Vector2.Zero;
return false;
}