@ Pure private static boolean intersectsCoplanarTriangle ( int i0 , int i1 , int con , double [ ] s1 , double [ ] s2 , double [ ] u1 , double [ ] u2 , double [ ] u3 ) { double Ax , Ay ; Ax = s2 [ i0 ] - s1 [ i0 ] ; Ay = s2 [ i1 ] - s1 [ i1 ] ; // test edge U0,U1 against V0,V1 if ( intersectEdgeEdge ( i0 , i1 , con , Ax , Ay , s1 , u1 , u2 ) ) return true ; // test edge U1,U2 against V0,V1 if ( intersectEdgeEdge ( i0 , i1 , con , Ax , Ay , s1 , u2 , u3 ) ) return true ; // test edge U2,U1 against V0,V1 if ( intersectEdgeEdge ( i0 , i1 , con , Ax , Ay , s1 , u3 , u1 ) ) return true ; return false ; }
Replies if coplanar segment - triangle intersect .