1. 面积法,检查所有边和point围成的面积的和是否等于三角形或矩形的面积。
http://www.geeksforgeeks.org/check-whether-a-given-point-lies-inside-a-triangle-or-not/ |
2. 判断point是否在所有边的(顺时针)向量的同一侧。如果是,则point在图形中。
http://stackoverflow.com/questions/2752725/finding-whether-a-point-lies-inside-a-rectangle-or-not
相关问题:
1. Detecting Whether Two Boxes Overlap
http://gamemath.com/2011/09/detecting-whether-two-boxes-overlap/
2. Detecting Whether Two Convex Polygons Overlap
http://gamemath.com/2011/09/detecting-whether-two-convex-polygons-overlap/
3.