< Summary

Class:DCL.Rendering.CullingControllerSettings
Assembly:CullingControllerInterfaces
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Rendering/Culling/Interfaces/CullingControllerSettings.cs
Covered lines:10
Uncovered lines:0
Coverable lines:10
Total lines:59
Line coverage:100% (10 of 10)
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        public const float MAX_TIME_BUDGET = 0.25f / 1000f;
 13        public const int MAX_POPULATING_ELEMENTS_PER_FRAME = 100;
 14
 12715        public bool enableObjectCulling = true;
 12716        public bool enableShadowCulling = true;
 17        public bool enableAnimationCulling = false;
 18
 12719        public float enableAnimationCullingDistance = 7.5f;
 20
 12721        public int ignoredLayersMask = LayerMask.GetMask("Tutorial", "CharacterPreview", "ViewportCullingIgnored");
 22
 12723        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
 12735        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}