< Summary

Class:DCL.Rendering.CullingControllerSettings
Assembly:CullingControllerInterfaces
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Rendering/Culling/Interfaces/CullingControllerSettings.cs
Covered lines:11
Uncovered lines:0
Coverable lines:11
Total lines:59
Line coverage:100% (11 of 11)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
CullingControllerSettings()0%110100%
Clone()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Rendering/Culling/Interfaces/CullingControllerSettings.cs

#LineLine coverage
 1using System;
 2using UnityEngine;
 3
 4namespace DCL.Rendering
 5{
 6    /// <summary>
 7    /// This class contains the settings CullingController. Mainly used by the quality settings panel.
 8    /// </summary>
 9    [System.Serializable]
 10    public class CullingControllerSettings
 11    {
 12        [NonSerialized]
 7913        public float maxTimeBudget = 4 / 1000f;
 14
 7915        public bool enableObjectCulling = true;
 7916        public bool enableShadowCulling = true;
 17        public bool enableAnimationCulling = false;
 18
 7919        public float enableAnimationCullingDistance = 7.5f;
 20
 7921        public int ignoredLayersMask = LayerMask.GetMask("Tutorial", "CharacterPreview", "ViewportCullingIgnored");
 22
 7923        public CullingControllerProfile rendererProfile =
 24            new CullingControllerProfile
 25            {
 26                visibleDistanceThreshold = 30,
 27                shadowDistanceThreshold = 20,
 28                emissiveSizeThreshold = 2.5f,
 29                opaqueSizeThreshold = 6,
 30                shadowRendererSizeThreshold = 10,
 31                shadowMapProjectionSizeThreshold = 4,
 32                maxShadowDistanceForAvatars = 20,
 33            };
 34
 7935        public CullingControllerProfile skinnedRendererProfile =
 36            new CullingControllerProfile
 37            {
 38                visibleDistanceThreshold = 50,
 39                shadowDistanceThreshold = 40,
 40                emissiveSizeThreshold = 2.5f,
 41                opaqueSizeThreshold = 6,
 42                shadowRendererSizeThreshold = 5,
 43                shadowMapProjectionSizeThreshold = 4,
 44                maxShadowDistanceForAvatars = 20,
 45            };
 46
 47        /// <summary>
 48        /// Returns a clone of this object. The profiles are also cloned, making this return a deep clone.
 49        /// </summary>
 50        /// <returns>The deep clone.</returns>
 51        public CullingControllerSettings Clone()
 52        {
 753            var clone = this.MemberwiseClone() as CullingControllerSettings;
 754            clone.rendererProfile = rendererProfile.Clone();
 755            clone.skinnedRendererProfile = skinnedRendererProfile.Clone();
 756            return clone;
 57        }
 58    }
 59}