Pathfinding.Voxels.ExtraMesh.RecalculateBounds C# (CSharp) Method

RecalculateBounds() public method

public RecalculateBounds ( ) : void
return void
		public void RecalculateBounds () {
			Bounds b = new Bounds(matrix.MultiplyPoint3x4(vertices[0]),Vector3.zero);
			for (int i=1;i<vertices.Length;i++) {
				b.Encapsulate (matrix.MultiplyPoint3x4(vertices[i]));
			}
			//Assigned here to avoid changing bounds if vertices would happen to be null
			bounds = b;
		}
	}