Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. bool isOverlap(Polygon A, Polygon B){
  2. foreach(Vertex v in A)
  3. {
  4. if(isInside(v, B))
  5. return true;
  6. }
  7. foreach(Vertex v in B)
  8. {
  9. if(isInside(v, A ))
  10. return true;
  11. }
  12. return false
  13. }
  14.  
  15. bool isInside(Vertex v, Polygon p)
  16. { //you can choose either Crossing Number or Winding Numer, you can google implementation
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement