Beispiel #1
0
 /** Returns if the triangle \a ABC contains the point \a p.
  * The triangle vertices are assumed to be laid out in clockwise order.
  */
 public static bool ContainsPoint(Vector2Int a, Vector2Int b, Vector2Int c, Vector2Int p)
 {
     return(CVectorMath.IsClockwiseOrColinear(a, b, p) && CVectorMath.IsClockwiseOrColinear(b, c, p) && CVectorMath.IsClockwiseOrColinear(c, a, p));
 }
Beispiel #2
0
 /** Returns if the triangle \a ABC contains the point \a p in XZ space.
  * The triangle vertices are assumed to be laid out in clockwise order.
  */
 public static bool ContainsPointXZ(Vector3 a, Vector3 b, Vector3 c, Vector3 p)
 {
     return(CVectorMath.IsClockwiseMarginXZ(a, b, p) && CVectorMath.IsClockwiseMarginXZ(b, c, p) && CVectorMath.IsClockwiseMarginXZ(c, a, p));
 }