private void markNeighbor ( TriangulationPoint p1 , TriangulationPoint p2 , DelaunayTriangle t ) { if ( ( p1 == points [ 2 ] && p2 == points [ 1 ] ) || ( p1 == points [ 1 ] && p2 == points [ 2 ] ) ) { neighbors [ 0 ] = t ; } else if ( ( p1 == points [ 0 ] && p2 == points [ 2 ] ) || ( p1 == points [ 2 ] && p2 == points [ 0 ] ) ) { neighbors [ 1 ] = t ; } else if ( ( p1 == points [ 0 ] && p2 == points [ 1 ] ) || ( p1 == points [ 1 ] && p2 == points [ 0 ] ) ) { neighbors [ 2 ] = t ; } else { logger . error ( "Neighbor error, please report!" ) ; // throw new Exception("Neighbor error, please report!"); } }
Update neighbor pointers