private RemoveIfNonNeighbor ( PMVertex n ) : void | ||
n | PMVertex | |
Результат | void |
internal void RemoveIfNonNeighbor( PMVertex n )
{
// removes n from neighbor list if n isn't a neighbor.
if ( !neighbors.Contains( n ) )
return; // Not in neighbor list anyway
foreach ( PMTriangle face in faces )
{
if ( face.HasCommonVertex( n ) )
return; // Still a neighbor
}
neighbors.Remove( n );
if ( neighbors.Count == 0 && !toBeRemoved )
{
// This vertex has been removed through isolation (collapsing around it)
this.NotifyRemoved();
}
}
internal void AddIfNonNeighbor( PMVertex n )