overlapping polygons?
Intersect their edges, and check if a vertex of A is inside B, and if a vertex of B is inside A.
Cédric
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.
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
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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement