예제 #1
0
 /// <summary>
 /// 检查点是否在生成的警戒线凸包之中
 /// </summary>
 /// <param name="p">要检查的点</param>
 /// <param name="convex">如果点处于某个凸包之中,返回这个凸包,否则为null</param>
 /// <returns></returns>
 public bool PointInConvexs(Vector2 p, out GuardConvex convex)
 {
     foreach (GuardConvex conve in convexs)
     {
         if (conve.PointInConvex(p))
         {
             convex = conve;
             return(true);
         }
     }
     convex = null;
     return(false);
 }
예제 #2
0
 /// <summary>
 /// 检查点是否在生成的警戒线凸包之中
 /// </summary>
 /// <param name="p">要检查的点</param>
 /// <param name="convex">如果点处于某个凸包之中,返回这个凸包,否则为null</param>
 /// <returns></returns>
 public bool PointInConvexs ( Vector2 p, out GuardConvex convex )
 {
     foreach (GuardConvex conve in convexs)
     {
         if (conve.PointInConvex( p ))
         {
             convex = conve;
             return true;
         }
     }
     convex = null;
     return false;
 }