public static void CalculateInterpolatedLightAndOcclusionProbes(Vector3[] positions, SphericalHarmonicsL2[] lightProbes, Vector4[] occlusionProbes) { bool flag = positions == null; if (flag) { throw new ArgumentNullException("positions"); } bool flag2 = lightProbes == null && occlusionProbes == null; if (flag2) { throw new ArgumentException("Argument lightProbes and occlusionProbes cannot both be null."); } bool flag3 = lightProbes != null && lightProbes.Length < positions.Length; if (flag3) { throw new ArgumentException("lightProbes", "Argument lightProbes has less elements than positions"); } bool flag4 = occlusionProbes != null && occlusionProbes.Length < positions.Length; if (flag4) { throw new ArgumentException("occlusionProbes", "Argument occlusionProbes has less elements than positions"); } LightProbes.CalculateInterpolatedLightAndOcclusionProbes_Internal(positions, positions.Length, lightProbes, occlusionProbes); }
public static void CalculateInterpolatedLightAndOcclusionProbes(List <Vector3> positions, List <SphericalHarmonicsL2> lightProbes, List <Vector4> occlusionProbes) { bool flag = positions == null; if (flag) { throw new ArgumentNullException("positions"); } bool flag2 = lightProbes == null && occlusionProbes == null; if (flag2) { throw new ArgumentException("Argument lightProbes and occlusionProbes cannot both be null."); } bool flag3 = lightProbes != null; if (flag3) { bool flag4 = lightProbes.Capacity < positions.Count; if (flag4) { lightProbes.Capacity = positions.Count; } bool flag5 = lightProbes.Count < positions.Count; if (flag5) { NoAllocHelpers.ResizeList <SphericalHarmonicsL2>(lightProbes, positions.Count); } } bool flag6 = occlusionProbes != null; if (flag6) { bool flag7 = occlusionProbes.Capacity < positions.Count; if (flag7) { occlusionProbes.Capacity = positions.Count; } bool flag8 = occlusionProbes.Count < positions.Count; if (flag8) { NoAllocHelpers.ResizeList <Vector4>(occlusionProbes, positions.Count); } } LightProbes.CalculateInterpolatedLightAndOcclusionProbes_Internal(NoAllocHelpers.ExtractArrayFromListT <Vector3>(positions), positions.Count, NoAllocHelpers.ExtractArrayFromListT <SphericalHarmonicsL2>(lightProbes), NoAllocHelpers.ExtractArrayFromListT <Vector4>(occlusionProbes)); }