Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 Crossing Number or Winding Numer, you can google implementation
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement