public void CopySHCoefficientArraysFrom(List <SphericalHarmonicsL2> lightProbes) { if (lightProbes == null) { throw new ArgumentNullException("lightProbes"); } CopySHCoefficientArraysFrom(NoAllocHelpers.ExtractArrayFromListT(lightProbes), 0, 0, lightProbes.Count); }
public static void DrawMeshInstanced(Mesh mesh, int submeshIndex, Material material, List <Matrix4x4> matrices, [uei.DefaultValue("null")] MaterialPropertyBlock properties, [uei.DefaultValue("ShadowCastingMode.On")] ShadowCastingMode castShadows, [uei.DefaultValue("true")] bool receiveShadows, [uei.DefaultValue("0")] int layer, [uei.DefaultValue("null")] Camera camera, [uei.DefaultValue("LightProbeUsage.BlendProbes")] LightProbeUsage lightProbeUsage, [uei.DefaultValue("null")] LightProbeProxyVolume lightProbeProxyVolume) { if (matrices == null) { throw new ArgumentNullException("matrices"); } DrawMeshInstanced(mesh, submeshIndex, material, NoAllocHelpers.ExtractArrayFromListT(matrices), matrices.Count, properties, castShadows, receiveShadows, layer, camera, lightProbeUsage, lightProbeProxyVolume); }
public void GetBoneWeights(List <BoneWeight> boneWeights) { if (boneWeights == null) { throw new ArgumentNullException("The result boneWeights list cannot be null.", "boneWeights"); } NoAllocHelpers.EnsureListElemCount <BoneWeight>(boneWeights, this.GetBoneWeightCount()); this.GetBoneWeightsNonAllocImpl(NoAllocHelpers.ExtractArrayFromListT <BoneWeight>(boneWeights)); }
public void GetBindposes(List <Matrix4x4> bindposes) { if (bindposes == null) { throw new ArgumentNullException("The result bindposes list cannot be null.", "bindposes"); } NoAllocHelpers.EnsureListElemCount <Matrix4x4>(bindposes, this.GetBindposeCount()); this.GetBindposesNonAllocImpl(NoAllocHelpers.ExtractArrayFromListT <Matrix4x4>(bindposes)); }
public void CopyProbeOcclusionArrayFrom(List <Vector4> occlusionProbes) { bool flag = occlusionProbes == null; if (flag) { throw new ArgumentNullException("occlusionProbes"); } this.CopyProbeOcclusionArrayFrom(NoAllocHelpers.ExtractArrayFromListT <Vector4>(occlusionProbes), 0, 0, occlusionProbes.Count); }
public void GetSharedMaterials(List <Material> m) { bool flag = m == null; if (flag) { throw new ArgumentNullException("The result material list cannot be null.", "m"); } NoAllocHelpers.EnsureListElemCount <Material>(m, this.GetMaterialCount()); this.CopySharedMaterialArray(NoAllocHelpers.ExtractArrayFromListT <Material>(m)); }
public void GetIndices(List <int> indices, int submesh, [UnityEngine.Internal.DefaultValue("true")] bool applyBaseVertex) { if (indices == null) { throw new ArgumentNullException("The result indices list cannot be null.", "indices"); } if (submesh < 0 || submesh >= this.subMeshCount) { throw new IndexOutOfRangeException("Specified sub mesh is out of range. Must be greater or equal to 0 and less than subMeshCount."); } NoAllocHelpers.EnsureListElemCount <int>(indices, (int)this.GetIndexCount(submesh)); this.GetIndicesNonAllocImpl(NoAllocHelpers.ExtractArrayFromListT <int>(indices), submesh, applyBaseVertex); }
public void GetBoneWeights(List <BoneWeight> boneWeights) { if (boneWeights == null) { throw new ArgumentNullException("The result boneWeights list cannot be null.", "boneWeights"); } if (HasBoneWeights()) { NoAllocHelpers.EnsureListElemCount(boneWeights, vertexCount); } GetBoneWeightsNonAllocImpl(NoAllocHelpers.ExtractArrayFromListT(boneWeights)); }
public void GetIndices(List <ushort> indices, int submesh, bool applyBaseVertex = true) { if (indices == null) { throw new ArgumentNullException("The result indices list cannot be null.", nameof(indices)); } if (submesh < 0 || submesh >= subMeshCount) { throw new IndexOutOfRangeException("Specified sub mesh is out of range. Must be greater or equal to 0 and less than subMeshCount."); } NoAllocHelpers.EnsureListElemCount(indices, (int)GetIndexCount(submesh)); GetIndicesNonAllocImpl16(NoAllocHelpers.ExtractArrayFromListT(indices), submesh, applyBaseVertex); }
public void GetTriangles(List <int> triangles, int submesh, [DefaultValue("true")] bool applyBaseVertex) { if (triangles == null) { throw new ArgumentNullException("The result triangles list cannot be null.", "triangles"); } if (submesh < 0 || submesh >= subMeshCount) { throw new IndexOutOfRangeException("Specified sub mesh is out of range. Must be greater or equal to 0 and less than subMeshCount."); } NoAllocHelpers.EnsureListElemCount(triangles, 3 * (int)GetTrianglesCountImpl(submesh)); GetTrianglesNonAllocImpl(NoAllocHelpers.ExtractArrayFromListT(triangles), submesh, applyBaseVertex); }
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)); }
public void GetMaterials(List <Material> m) { bool flag = m == null; if (flag) { throw new ArgumentNullException("The result material list cannot be null.", "m"); } bool flag2 = this.IsPersistent(); if (flag2) { throw new InvalidOperationException("Not allowed to access Renderer.materials on prefab object. Use Renderer.sharedMaterials instead"); } NoAllocHelpers.EnsureListElemCount <Material>(m, this.GetMaterialCount()); this.CopyMaterialArray(NoAllocHelpers.ExtractArrayFromListT <Material>(m)); }
public static bool GenerateAtlas(Vector2[] sizes, int padding, int atlasSize, List <Rect> results) { bool flag = sizes == null; if (flag) { throw new ArgumentException("sizes array can not be null"); } bool flag2 = results == null; if (flag2) { throw new ArgumentException("results list cannot be null"); } bool flag3 = padding < 0; if (flag3) { throw new ArgumentException("padding can not be negative"); } bool flag4 = atlasSize <= 0; if (flag4) { throw new ArgumentException("atlas size must be positive"); } results.Clear(); bool flag5 = sizes.Length == 0; bool result; if (flag5) { result = true; } else { NoAllocHelpers.EnsureListElemCount <Rect>(results, sizes.Length); Texture2D.GenerateAtlasImpl(sizes, padding, atlasSize, NoAllocHelpers.ExtractArrayFromListT <Rect>(results)); result = (results.Count != 0); } return(result); }
public static void CalculateInterpolatedLightAndOcclusionProbes(List <Vector3> positions, List <SphericalHarmonicsL2> lightProbes, List <Vector4> occlusionProbes) { if (positions == null) { throw new ArgumentNullException("positions"); } else 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(lightProbes, positions.Count); } } if (occlusionProbes != null) { if (occlusionProbes.Capacity < positions.Count) { occlusionProbes.Capacity = positions.Count; } if (occlusionProbes.Count < positions.Count) { NoAllocHelpers.ResizeList(occlusionProbes, positions.Count); } } CalculateInterpolatedLightAndOcclusionProbes_Internal(NoAllocHelpers.ExtractArrayFromListT(positions), positions.Count, NoAllocHelpers.ExtractArrayFromListT(lightProbes), NoAllocHelpers.ExtractArrayFromListT(occlusionProbes)); }
public static void SetGlobalFloatArray(int name, List <float> values) { Shader.SetGlobalFloatArray(name, NoAllocHelpers.ExtractArrayFromListT <float>(values), values.Count); }
public void SetMatrixArray(string name, List <Matrix4x4> values) { this.SetMatrixArray(Shader.PropertyToID(name), NoAllocHelpers.ExtractArrayFromListT <Matrix4x4>(values), values.Count); }
public void SetFloatArray(string name, List <float> values) { this.SetFloatArray(Shader.PropertyToID(name), NoAllocHelpers.ExtractArrayFromListT <float>(values), values.Count); }
public void SetColorArray(int name, List <Color> values) { this.SetColorArray(name, NoAllocHelpers.ExtractArrayFromListT <Color>(values), values.Count); }
public static void SetGlobalMatrixArray(string name, List <Matrix4x4> values) { SetGlobalMatrixArray(Shader.PropertyToID(name), NoAllocHelpers.ExtractArrayFromListT(values), values.Count); }
public static void SetGlobalMatrixArray(int nameID, List <Matrix4x4> values) { SetGlobalMatrixArray(nameID, NoAllocHelpers.ExtractArrayFromListT(values), values.Count); }
public void SetFloatArray(int name, List <float> values) { this.SetFloatArray(name, NoAllocHelpers.ExtractArrayFromListT <float>(values), values.Count); }
public static void SetGlobalVectorArray(int nameID, List <Vector4> values) { SetGlobalVectorArray(nameID, NoAllocHelpers.ExtractArrayFromListT(values), values.Count); }
public void SetColorArray(int nameID, List <Color> values) { SetColorArray(nameID, NoAllocHelpers.ExtractArrayFromListT(values), values.Count); }
public void SetVectorArray(string name, List <Vector4> values) { SetVectorArray(Shader.PropertyToID(name), NoAllocHelpers.ExtractArrayFromListT(values), values.Count); }
public void SetFloatArray(int nameID, List <float> values) { SetFloatArray(nameID, NoAllocHelpers.ExtractArrayFromListT(values), values.Count); }
public void CopyProbeOcclusionArrayFrom(List <Vector4> occlusionProbes, int sourceStart, int destStart, int count) { this.CopyProbeOcclusionArrayFrom(NoAllocHelpers.ExtractArrayFromListT <Vector4>(occlusionProbes), sourceStart, destStart, count); }
public void CopySHCoefficientArraysFrom(List <SphericalHarmonicsL2> lightProbes, int sourceStart, int destStart, int count) { this.CopySHCoefficientArraysFrom(NoAllocHelpers.ExtractArrayFromListT <SphericalHarmonicsL2>(lightProbes), sourceStart, destStart, count); }
public void SetMatrixArray(int name, List <Matrix4x4> values) { this.SetMatrixArray(name, NoAllocHelpers.ExtractArrayFromListT <Matrix4x4>(values), values.Count); }
public void SetVectorArray(int name, List <Vector4> values) { this.SetVectorArray(name, NoAllocHelpers.ExtractArrayFromListT <Vector4>(values), values.Count); }