¡@

Home 

2014/10/15 ¤U¤È 10:12:48

iphone Programming Glossary: poly1

Objective-C check if subviews of rotated UIViews intersect?

http://stackoverflow.com/questions/15710853/objective-c-check-if-subviews-of-rotated-uiviews-intersect

what I got. Up to now I did only a few tests so I hope that there are not too many errors. BOOL convexPolygon CGPoint poly1 count int count1 intersectsWith CGPoint poly2 count int count2 tests if 2 convex polygons intersect. Both polygons are given.. perp.y if proj maxproj maxproj proj if proj minproj minproj proj minp minproj maxp maxproj BOOL convexPolygon CGPoint poly1 count int count1 intersectsWith CGPoint poly2 count int count2 for int i 0 i count1 i Perpendicular vector for one edge.. int count1 intersectsWith CGPoint poly2 count int count2 for int i 0 i count1 i Perpendicular vector for one edge of poly1 CGPoint p1 poly1 i CGPoint p2 poly1 i 1 count1 CGPoint perp CGPointMake p2.y p1.y p2.x p1.x Projection intervals of poly1..