¡@

Home 

2014/10/15 ¤U¤È 10:11:24

iphone Programming Glossary: minp1

Objective-C check if subviews of rotated UIViews intersect?

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

CGPoint perp CGPointMake p2.y p1.y p2.x p1.x Projection intervals of poly1 poly2 onto perpendicular vector CGFloat minp1 maxp1 minp2 maxp2 self projectionOfPolygon poly1 count count1 onto perp min minp1 max maxp1 self projectionOfPolygon poly2.. onto perpendicular vector CGFloat minp1 maxp1 minp2 maxp2 self projectionOfPolygon poly1 count count1 onto perp min minp1 max maxp1 self projectionOfPolygon poly2 count count1 onto perp min minp2 max maxp2 If projections do not overlap then we.. do not overlap then we have a separating axis which means that the polygons do not intersect if maxp1 minp2 maxp2 minp1 return NO And now the other way around with edges from poly2 for int i 0 i count2 i CGPoint p1 poly2 i CGPoint p2 poly2..