Пример #1
0
        // Token: 0x06000044 RID: 68 RVA: 0x00002C9C File Offset: 0x00000E9C
        public DistancePlane3Arc3(Plane3 plane, Arc3 arc)
        {
            this = default(DistancePlane3Arc3);
            double num  = arc.StartPoint.SignedDistanceTo(plane);
            double num2 = arc.EndPoint.SignedDistanceTo(plane);

            if (Math.Sign(num) != Math.Sign(num2))
            {
                this.SignedDistance = 0.0;
                return;
            }
            DistancePlane3Circle3 distancePlane3Circle = new DistancePlane3Circle3(plane, arc.Circle);
            double  signedDistance       = distancePlane3Circle.SignedDistance;
            Vector3 closestPointOnCircle = distancePlane3Circle.ClosestPointOnCircle;
            bool    flag = arc.Contains(arc.Circle.GetPointDirectionAngle(closestPointOnCircle));

            if (signedDistance != 0.0)
            {
                if (flag)
                {
                    this.SignedDistance = signedDistance;
                    return;
                }
                this.SignedDistance = ((num > 0.0) ? Math.Min(num, num2) : Math.Max(num, num2));
                return;
            }
            else
            {
                if (Math.Sign(arc.Circle.Center.SignedDistanceTo(plane)) != Math.Sign(num))
                {
                    this.SignedDistance = ((num > 0.0) ? Math.Min(num, num2) : Math.Max(num, num2));
                    return;
                }
                if (flag)
                {
                    this.SignedDistance = 0.0;
                    return;
                }
                this.SignedDistance = ((num > 0.0) ? Math.Min(num, num2) : Math.Max(num, num2));
                return;
            }
        }
Пример #2
0
        // Token: 0x06000043 RID: 67 RVA: 0x00002C7C File Offset: 0x00000E7C
        public static double SignedDistanceTo(this Circle3 circle3, Plane3 plane3)
        {
            DistancePlane3Circle3 distancePlane3Circle = new DistancePlane3Circle3(plane3, circle3);

            return(distancePlane3Circle.SignedDistance);
        }
Пример #3
0
        // Token: 0x06000111 RID: 273 RVA: 0x00005F64 File Offset: 0x00004164
        public static double DistanceTo(this Plane3 plane3, Circle3 circle3)
        {
            DistancePlane3Circle3 distancePlane3Circle = new DistancePlane3Circle3(plane3, circle3);

            return(distancePlane3Circle.Distance);
        }