< Summary

Class:ECSSystems.Helpers.TransformHelper
Assembly:ECS7Plugin.Systems.Helpers
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/Systems/Helpers/TransformHelper.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:27
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
TransformHelper()0%110100%
SetTransform(...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/Systems/Helpers/TransformHelper.cs

#LineLine coverage
 1using DCL.Controllers;
 2using DCL.ECSComponents;
 3using DCL.Models;
 4using UnityEngine;
 5
 6namespace ECSSystems.Helpers
 7{
 8    public static class TransformHelper
 9    {
 110        private static readonly ECSTransform reusableTransform = new ECSTransform()
 11        {
 12            position = Vector3.zero,
 13            scale = Vector3.one,
 14            parentId = SpecialEntityId.SCENE_ROOT_ENTITY,
 15            rotation = Quaternion.identity
 16        };
 17
 18        public static ECSTransform SetTransform(IParcelScene scene, ref Vector3 position,
 19            ref Quaternion rotation, ref Vector3 worldOffset)
 20        {
 1221            Vector3Helper.SetInSceneOffset(ref reusableTransform.position, scene, ref position, ref worldOffset);
 1222            QuaternionHelper.Set(ref reusableTransform.rotation, ref rotation);
 23
 1224            return reusableTransform;
 25        }
 26    }
 27}