Пример #1
0
        // Token: 0x0600007C RID: 124 RVA: 0x00003660 File Offset: 0x00001860
        public DistanceLine3Arc3(Line3 line, Arc3 arc)
        {
            this = default(DistanceLine3Arc3);
            Circle3 circle = arc.Circle;
            IEnumerable <double> polynomialRoots = DistanceLine3Circle3.GetPolynomialRoots(line, circle);
            double num = double.MaxValue;

            foreach (double num2 in polynomialRoots)
            {
                Vector3             vector             = line.Origin + num2 * line.Direction;
                DistanceVector3Arc3 distanceVector3Arc = new DistanceVector3Arc3(vector, arc);
                double squaredDistance = distanceVector3Arc.SquaredDistance;
                if (squaredDistance < num)
                {
                    num = squaredDistance;
                    this.ClosestPointOnLine = distanceVector3Arc.ClosestPointOnVector;
                    this.ClosestPointOnArc  = distanceVector3Arc.ClosestPointOnArc;
                    this.LineParameter      = num2;
                }
            }
            this.SquaredDistance = num;
        }
Пример #2
0
        // Token: 0x06000214 RID: 532 RVA: 0x00009470 File Offset: 0x00007670
        public static Segment3 ShortestSegmentTo(this Vector3 vector3, Arc3 arc3)
        {
            DistanceVector3Arc3 distanceVector3Arc = new DistanceVector3Arc3(vector3, arc3);

            return(new Segment3(distanceVector3Arc.ClosestPointOnVector, distanceVector3Arc.ClosestPointOnArc));
        }
Пример #3
0
        // Token: 0x06000213 RID: 531 RVA: 0x00009450 File Offset: 0x00007650
        public static double DistanceTo(this Vector3 vector3, Arc3 arc3)
        {
            DistanceVector3Arc3 distanceVector3Arc = new DistanceVector3Arc3(vector3, arc3);

            return(distanceVector3Arc.Distance);
        }
Пример #4
0
        // Token: 0x06000029 RID: 41 RVA: 0x000028EC File Offset: 0x00000AEC
        public static Vector3 ClosestPointTo(this Arc3 arc3, Vector3 vector3)
        {
            DistanceVector3Arc3 distanceVector3Arc = new DistanceVector3Arc3(vector3, arc3);

            return(distanceVector3Arc.ClosestPointOnArc);
        }