Tag Info

New answers tagged


Polygon A is overlapping polygon B if any of its vertices is inside B and vice versa. bool isOverlap(Polygon A, Polygon B){ foreach(Vertex v in A) { if(isInside(v, B)) return true; } foreach(Vertex v in B) { if(isInside(v, A )) return true; } return false } bool isInside(Vertex v, Polygon p) { //you can choose either ...

Top 50 recent answers are included