Advertisement

overlapping polygons?

Started by December 21, 2002 03:56 AM
3 comments, last by pcvsee 22 years, 1 month ago
how do i determine if two four sided 2D polygon is overlapping?
look at and say to yourself "is this overlapping?"
Advertisement
Intersect their edges, and check if a vertex of A is inside B, and if a vertex of B is inside A.

Cédric
You could follow Cédric''s approach, and use the point-in-polygon link in the forum FAQ to do the inside test.

Forum FAQ


Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
to check if A vertex is inside a polygon

take a V1 from polygon A and V2 from polygon B

x= V1 +a*(V2-V1)

the line x needs to intersect an edge if it does check the parameter a if it greater zero if so it is inside the polygon
you need to do this for every edge of polygon A
http://www.8ung.at/basiror/theironcross.html

This topic is closed to new replies.

Advertisement