示例#1
0
        // Token: 0x06000074 RID: 116 RVA: 0x0000356C File Offset: 0x0000176C
        public DistanceVector3Arc3(Vector3 vector, Arc3 arc)
        {
            this = default(DistanceVector3Arc3);
            DistanceVector3Circle3 distanceVector3Circle = new DistanceVector3Circle3(vector, arc.Circle);

            this.ClosestPointOnArc = distanceVector3Circle.ClosestPointOnCircle;
            if (!arc.Contains(arc.Circle.GetPointDirectionAngle(this.ClosestPointOnArc)))
            {
                double squaredLength  = (vector - arc.StartPoint).SquaredLength;
                double squaredLength2 = (vector - arc.EndPoint).SquaredLength;
                this.ClosestPointOnArc = ((squaredLength2 < squaredLength) ? arc.EndPoint : arc.StartPoint);
            }
            this.SquaredDistance      = (vector - this.ClosestPointOnArc).SquaredLength;
            this.ClosestPointOnVector = vector;
        }
示例#2
0
        // Token: 0x060000B6 RID: 182 RVA: 0x00004C18 File Offset: 0x00002E18
        public DistanceLine3Circle3(Line3 line, Circle3 circle)
        {
            this = default(DistanceLine3Circle3);
            IEnumerable <double> polynomialRoots = DistanceLine3Circle3.GetPolynomialRoots(line, circle);
            double num = double.MaxValue;

            foreach (double num2 in polynomialRoots)
            {
                Vector3 vector = line.Origin + num2 * line.Direction;
                DistanceVector3Circle3 distanceVector3Circle = new DistanceVector3Circle3(vector, circle);
                double squaredDistance = distanceVector3Circle.SquaredDistance;
                if (squaredDistance < num)
                {
                    num = squaredDistance;
                    this.ClosestPointOnLine   = distanceVector3Circle.ClosestPointOnVector;
                    this.ClosestPointOnCircle = distanceVector3Circle.ClosestPointOnCircle;
                    this.LineParameter        = num2;
                }
            }
            this.SquaredDistance = num;
        }
示例#3
0
        // Token: 0x06000212 RID: 530 RVA: 0x00009424 File Offset: 0x00007624
        public static Segment3 ShortestSegmentTo(this Vector3 vector3, Circle3 circle3)
        {
            DistanceVector3Circle3 distanceVector3Circle = new DistanceVector3Circle3(vector3, circle3);

            return(new Segment3(distanceVector3Circle.ClosestPointOnVector, distanceVector3Circle.ClosestPointOnCircle));
        }
示例#4
0
        // Token: 0x06000211 RID: 529 RVA: 0x00009404 File Offset: 0x00007604
        public static double DistanceTo(this Vector3 vector3, Circle3 circle3)
        {
            DistanceVector3Circle3 distanceVector3Circle = new DistanceVector3Circle3(vector3, circle3);

            return(distanceVector3Circle.Distance);
        }
示例#5
0
        // Token: 0x06000040 RID: 64 RVA: 0x00002C10 File Offset: 0x00000E10
        public static Vector3 ClosestPointTo(this Circle3 circle3, Vector3 vector3)
        {
            DistanceVector3Circle3 distanceVector3Circle = new DistanceVector3Circle3(vector3, circle3);

            return(distanceVector3Circle.ClosestPointOnCircle);
        }