UnityEditor.ClothInspector.UpdateRectSelection C# (CSharp) Method

UpdateRectSelection() private method

private UpdateRectSelection ( ) : bool
return bool
        private bool UpdateRectSelection()
        {
            bool flag = false;
            SkinnedMeshRenderer component = this.cloth.GetComponent<SkinnedMeshRenderer>();
            Vector3[] normals = this.cloth.normals;
            ClothSkinningCoefficient[] coefficients = this.cloth.coefficients;
            float x = Mathf.Min(this.m_SelectStartPoint.x, this.m_SelectMousePoint.x);
            float num2 = Mathf.Max(this.m_SelectStartPoint.x, this.m_SelectMousePoint.x);
            float y = Mathf.Min(this.m_SelectStartPoint.y, this.m_SelectMousePoint.y);
            float num4 = Mathf.Max(this.m_SelectStartPoint.y, this.m_SelectMousePoint.y);
            Ray ray = HandleUtility.GUIPointToWorldRay(new Vector2(x, y));
            Ray ray2 = HandleUtility.GUIPointToWorldRay(new Vector2(num2, y));
            Ray ray3 = HandleUtility.GUIPointToWorldRay(new Vector2(x, num4));
            Ray ray4 = HandleUtility.GUIPointToWorldRay(new Vector2(num2, num4));
            Plane plane = new Plane(ray2.origin + ray2.direction, ray.origin + ray.direction, ray.origin);
            Plane plane2 = new Plane(ray3.origin + ray3.direction, ray4.origin + ray4.direction, ray4.origin);
            Plane plane3 = new Plane(ray.origin + ray.direction, ray3.origin + ray3.direction, ray3.origin);
            Plane plane4 = new Plane(ray4.origin + ray4.direction, ray2.origin + ray2.direction, ray2.origin);
            Quaternion rotation = component.actualRootBone.rotation;
            for (int i = 0; i < coefficients.Length; i++)
            {
                Vector3 inPt = this.m_LastVertices[i];
                bool flag2 = Vector3.Dot((Vector3) (rotation * normals[i]), Camera.current.transform.forward) <= 0f;
                bool flag3 = (((plane.GetSide(inPt) && plane2.GetSide(inPt)) && plane3.GetSide(inPt)) && plane4.GetSide(inPt)) && (this.state.ManipulateBackfaces || flag2);
                if (this.m_RectSelection[i] != flag3)
                {
                    this.m_RectSelection[i] = flag3;
                    flag = true;
                }
            }
            return flag;
        }