Pathfinding.Polygon.IsClockwise C# (CSharp) Method

IsClockwise() public static method

public static IsClockwise ( Int3 a, Int3 b, Int3 c ) : bool
a Int3
b Int3
c Int3
return bool
		public static bool IsClockwise (Int3 a, Int3 b, Int3 c) {
			return (long)(b.x - a.x) * (long)(c.z - a.z) - (long)(c.x - a.x) * (long)(b.z - a.z) < 0;
		}
		

Same methods

Polygon::IsClockwise ( Vector3 a, Vector3 b, Vector3 c ) : bool

Usage Example

Ejemplo n.º 1
0
 /** Returns if the point is inside the node in XZ space */
 public bool ContainsPoint(MeshNode node, Vector3 pos)
 {
     if (Polygon.IsClockwise((Vector3)vertices[node.v1], (Vector3)vertices[node.v2], pos) && Polygon.IsClockwise((Vector3)vertices[node.v2], (Vector3)vertices[node.v3], pos) && Polygon.IsClockwise((Vector3)vertices[node.v3], (Vector3)vertices[node.v1], pos))
     {
         return(true);
     }
     return(false);
 }
All Usage Examples Of Pathfinding.Polygon::IsClockwise