public List < Triangle > findTriangleNeighborhood ( Triangle firstTriangle , Vector3 point ) { List < Triangle > triangles = new ArrayList < Triangle > ( 30 ) ; triangles . add ( firstTriangle ) ; Triangle prevTriangle = null ; Triangle currentTriangle = firstTriangle ; Triangle nextTriangle = currentTriangle . nextNeighbor ( point , prevTriangle ) ; while ( ! nextTriangle . equals ( firstTriangle ) ) { //the point is on the perimeter if ( nextTriangle . isHalfplane ( ) ) { return null ; } triangles . add ( nextTriangle ) ; prevTriangle = currentTriangle ; currentTriangle = nextTriangle ; nextTriangle = currentTriangle . nextNeighbor ( point , prevTriangle ) ; } return triangles ; }
changed to public by Udi