Pathfinding.NavmeshCut.Intersects C# (CSharp) Method

Intersects() private static method

private static Intersects ( Bounds b1, Bounds b2 ) : bool
b1 UnityEngine.Bounds
b2 UnityEngine.Bounds
return bool
		private static bool Intersects (Bounds b1, Bounds b2)        {
			Vector3 min1 = b1.min;
			Vector3 max1 = b1.max;
			Vector3 min2 = b2.min;
			Vector3 max2 = b2.max;
			return min1.x <= max2.x && max1.x >= min2.x && min1.y <= max2.y && max1.y >= min2.y && min1.z <= max2.z && max1.z >= min2.z;
		}
	

Usage Example

Ejemplo n.º 1
0
		public static List<NavmeshCut> GetAllInRange(Bounds b)
		{
			List<NavmeshCut> list = ListPool<NavmeshCut>.Claim();
			for (int i = 0; i < NavmeshCut.allCuts.Count; i++)
			{
				if (NavmeshCut.allCuts[i].enabled && NavmeshCut.Intersects(b, NavmeshCut.allCuts[i].GetBounds()))
				{
					list.Add(NavmeshCut.allCuts[i]);
				}
			}
			return list;
		}
All Usage Examples Of Pathfinding.NavmeshCut::Intersects