コード例 #1
0
ファイル: LightProbes.cs プロジェクト: yaoya/UnityDecompiled
 public static void CalculateInterpolatedLightAndOcclusionProbes(List <Vector3> positions, List <SphericalHarmonicsL2> lightProbes, List <Vector4> occlusionProbes)
 {
     if (positions == null)
     {
         throw new ArgumentNullException("positions");
     }
     if (lightProbes == null && occlusionProbes == null)
     {
         throw new ArgumentException("Argument lightProbes and occlusionProbes cannot both be null.");
     }
     if (lightProbes != null)
     {
         if (lightProbes.Capacity < positions.Count)
         {
             lightProbes.Capacity = positions.Count;
         }
         if (lightProbes.Count < positions.Count)
         {
             NoAllocHelpers.ResizeList <SphericalHarmonicsL2>(lightProbes, positions.Count);
         }
     }
     if (occlusionProbes != null)
     {
         if (occlusionProbes.Capacity < positions.Count)
         {
             occlusionProbes.Capacity = positions.Count;
         }
         if (occlusionProbes.Count < positions.Count)
         {
             NoAllocHelpers.ResizeList <Vector4>(occlusionProbes, positions.Count);
         }
     }
     LightProbes.Internal_CalculateInterpolatedLightAndOcclusionProbes(NoAllocHelpers.ExtractArrayFromListT <Vector3>(positions), positions.Count, NoAllocHelpers.ExtractArrayFromListT <SphericalHarmonicsL2>(lightProbes), NoAllocHelpers.ExtractArrayFromListT <Vector4>(occlusionProbes));
 }
コード例 #2
0
ファイル: LightProbes.cs プロジェクト: yaoya/UnityDecompiled
 public static void CalculateInterpolatedLightAndOcclusionProbes(Vector3[] positions, SphericalHarmonicsL2[] lightProbes, Vector4[] occlusionProbes)
 {
     if (positions == null)
     {
         throw new ArgumentNullException("positions");
     }
     if (lightProbes == null && occlusionProbes == null)
     {
         throw new ArgumentException("Argument lightProbes and occlusionProbes cannot both be null.");
     }
     if (lightProbes != null && lightProbes.Length < positions.Length)
     {
         throw new ArgumentException("lightProbes", "Argument lightProbes has less elements than positions");
     }
     if (occlusionProbes != null && occlusionProbes.Length < positions.Length)
     {
         throw new ArgumentException("occlusionProbes", "Argument occlusionProbes has less elements than positions");
     }
     LightProbes.Internal_CalculateInterpolatedLightAndOcclusionProbes(positions, positions.Length, lightProbes, occlusionProbes);
 }