// Token: 0x060004BF RID: 1215 RVA: 0x000187DC File Offset: 0x000169DC
        public static Rectangle3 Transform(this AffineTransform3 transformer, Rectangle3 rectangle)
        {
            AffineTransform3 source          = new AffineTransform3(rectangle.Axis0, rectangle.Axis1, rectangle.Axis0.UnitCross(rectangle.Axis1), rectangle.Center, 1.0);
            AffineTransform3 affineTransform = transformer.Transform(source);

            return(new Rectangle3(affineTransform.Origin, affineTransform.AxisX, affineTransform.AxisY, rectangle.Extent0 * transformer.Scale, rectangle.Extent1 * transformer.Scale));
        }
Beispiel #2
0
        // Token: 0x06000145 RID: 325 RVA: 0x00006AC4 File Offset: 0x00004CC4
        public DistanceRay3Rectangle3(Ray3 ray, Rectangle3 rectangle)
        {
            this = default(DistanceRay3Rectangle3);
            Line3 line = new Line3(ray.Origin, ray.Direction);
            DistanceLine3Rectangle3 distanceLine3Rectangle = new DistanceLine3Rectangle3(line, rectangle);

            if (distanceLine3Rectangle.LineParameter >= 0.0)
            {
                this.SquaredDistance         = distanceLine3Rectangle.SquaredDistance;
                this.ClosestPointOnRay       = distanceLine3Rectangle.ClosestPointOnLine;
                this.ClosestPointOnRectangle = distanceLine3Rectangle.ClosestPointOnRectangle;
                this.RayParameter            = distanceLine3Rectangle.LineParameter;
                this.RectCoord0 = distanceLine3Rectangle.RectCoord0;
                this.RectCoord1 = distanceLine3Rectangle.RectCoord1;
                return;
            }
            DistanceVector3Rectangle3 distanceVector3Rectangle = new DistanceVector3Rectangle3(ray.Origin, rectangle);

            this.SquaredDistance         = distanceVector3Rectangle.SquaredDistance;
            this.ClosestPointOnRay       = ray.Origin;
            this.ClosestPointOnRectangle = distanceVector3Rectangle.ClosestPointOnRectangle;
            this.RayParameter            = 0.0;
            this.RectCoord0 = distanceVector3Rectangle.RectCoord0;
            this.RectCoord1 = distanceVector3Rectangle.RectCoord1;
        }
        // Token: 0x0600048D RID: 1165 RVA: 0x00016CC0 File Offset: 0x00014EC0
        public static AxisAlignedBox3 ComputeAxisAlignedBoundingBox(this Rectangle3 rectangle)
        {
            Vector3 vector  = rectangle.Center;
            Vector3 vector2 = vector;

            foreach (Vector3 value in rectangle.ComputeVertices())
            {
                vector  = Vector3.Min(vector, value);
                vector2 = Vector3.Max(vector2, value);
            }
            return(new AxisAlignedBox3(vector, vector2));
        }
        // Token: 0x0600022E RID: 558 RVA: 0x00009788 File Offset: 0x00007988
        public DistanceVector3Rectangle3(Vector3 vector, Rectangle3 rectangle)
        {
            this = default(DistanceVector3Rectangle3);
            Vector3 vector2 = rectangle.Center - vector;
            double  num     = vector2.Dot(rectangle.Axis0);
            double  num2    = vector2.Dot(rectangle.Axis1);
            double  num3    = -num;
            double  num4    = -num2;
            double  num5    = vector2.SquaredLength;

            if (num3 < -rectangle.Extent0)
            {
                num3 = -rectangle.Extent0;
            }
            else if (num3 > rectangle.Extent0)
            {
                num3 = rectangle.Extent0;
            }
            double num6 = num5;
            double num7 = num3;

            num5 = num6 + num7 * (num7 + 2.0 * num);
            if (num4 < -rectangle.Extent1)
            {
                num4 = -rectangle.Extent1;
            }
            else if (num4 > rectangle.Extent1)
            {
                num4 = rectangle.Extent1;
            }
            double num8 = num5;
            double num9 = num4;

            num5 = num8 + num9 * (num9 + 2.0 * num2);
            if (num5 < 0.0)
            {
                num5 = 0.0;
            }
            this.ClosestPointOnVector    = vector;
            this.ClosestPointOnRectangle = rectangle.Center + num3 * rectangle.Axis0 + num4 * rectangle.Axis1;
            this.RectCoord0      = num3;
            this.RectCoord1      = num4;
            this.SquaredDistance = num5;
        }
Beispiel #5
0
 // Token: 0x06000183 RID: 387 RVA: 0x000074D8 File Offset: 0x000056D8
 public DistanceRectangle3Rectangle3(Rectangle3 rectangle0, Rectangle3 rectangle1)
 {
     this = default(DistanceRectangle3Rectangle3);
     this.SquaredDistance = double.MaxValue;
     for (int i = 0; i < 2; i++)
     {
         for (int j = -1; j <= 1; j += 2)
         {
             double      num       = (i == 0) ? rectangle0.Extent1 : rectangle0.Extent0;
             UnitVector3 vector    = (i == 0) ? rectangle0.Axis1 : rectangle0.Axis0;
             Vector3     origin    = rectangle0.Center + (double)j * num * vector;
             UnitVector3 direction = (i == 0) ? rectangle0.Axis0 : rectangle0.Axis1;
             double      extent    = (i == 0) ? rectangle0.Extent0 : rectangle0.Extent1;
             Segment3    segment   = new Segment3(origin, direction, extent);
             DistanceSegment3Rectangle3 distanceSegment3Rectangle = new DistanceSegment3Rectangle3(segment, rectangle1);
             if (distanceSegment3Rectangle.SquaredDistance < this.SquaredDistance)
             {
                 this.ClosestPoint0   = distanceSegment3Rectangle.ClosestPointOnSegment;
                 this.ClosestPoint1   = distanceSegment3Rectangle.ClosestPointOnRectangle;
                 this.SquaredDistance = distanceSegment3Rectangle.SquaredDistance;
             }
         }
     }
     for (int i = 0; i < 2; i++)
     {
         for (int j = -1; j <= 1; j += 2)
         {
             double      num2       = (i == 0) ? rectangle1.Extent1 : rectangle1.Extent0;
             UnitVector3 vector2    = (i == 0) ? rectangle1.Axis1 : rectangle1.Axis0;
             Vector3     origin2    = rectangle1.Center + (double)j * num2 * vector2;
             UnitVector3 direction2 = (i == 0) ? rectangle1.Axis0 : rectangle1.Axis1;
             double      extent2    = (i == 0) ? rectangle1.Extent0 : rectangle1.Extent1;
             Segment3    segment2   = new Segment3(origin2, direction2, extent2);
             DistanceSegment3Rectangle3 distanceSegment3Rectangle2 = new DistanceSegment3Rectangle3(segment2, rectangle0);
             if (distanceSegment3Rectangle2.SquaredDistance < this.SquaredDistance)
             {
                 this.ClosestPoint0   = distanceSegment3Rectangle2.ClosestPointOnRectangle;
                 this.ClosestPoint1   = distanceSegment3Rectangle2.ClosestPointOnSegment;
                 this.SquaredDistance = distanceSegment3Rectangle2.SquaredDistance;
             }
         }
     }
 }
        // Token: 0x060001EE RID: 494 RVA: 0x00008D90 File Offset: 0x00006F90
        public DistanceTriangle3Rectangle3(Triangle3 triangle, Rectangle3 rectangle)
        {
            this = default(DistanceTriangle3Rectangle3);
            double num = double.MaxValue;
            int    i   = 2;
            int    j   = 0;

            while (j < 3)
            {
                Segment3 segment = new Segment3(triangle[i], triangle[j]);
                DistanceSegment3Rectangle3 distanceSegment3Rectangle = new DistanceSegment3Rectangle3(segment, rectangle);
                if (distanceSegment3Rectangle.SquaredDistance < num)
                {
                    this.ClosestPointOnTriangle  = distanceSegment3Rectangle.ClosestPointOnSegment;
                    this.ClosestPointOnRectangle = distanceSegment3Rectangle.ClosestPointOnRectangle;
                    num = distanceSegment3Rectangle.SquaredDistance;
                }
                i = j++;
            }
            for (j = 0; j < 2; j++)
            {
                for (i = -1; i <= 1; i += 2)
                {
                    double      num2      = (j == 0) ? rectangle.Extent1 : rectangle.Extent0;
                    UnitVector3 vector    = (j == 0) ? rectangle.Axis1 : rectangle.Axis0;
                    Vector3     origin    = rectangle.Center + (double)i * num2 * vector;
                    UnitVector3 direction = (j == 0) ? rectangle.Axis0 : rectangle.Axis1;
                    double      extent    = (j == 0) ? rectangle.Extent0 : rectangle.Extent1;
                    Segment3    segment2  = new Segment3(origin, direction, extent);
                    DistanceSegment3Triangle3 distanceSegment3Triangle = new DistanceSegment3Triangle3(segment2, triangle);
                    if (distanceSegment3Triangle.SquaredDistance < num)
                    {
                        this.ClosestPointOnTriangle  = distanceSegment3Triangle.ClosestPointOnTriangle;
                        this.ClosestPointOnRectangle = distanceSegment3Triangle.ClosestPointOnSegment;
                        num = distanceSegment3Triangle.SquaredDistance;
                    }
                }
            }
            this.SquaredDistance = num;
        }
Beispiel #7
0
        // Token: 0x0600005A RID: 90 RVA: 0x00003120 File Offset: 0x00001320
        public DistancePlane3Rectangle3(Plane3 plane, Rectangle3 rectangle)
        {
            this = default(DistancePlane3Rectangle3);
            DistanceVector3Plane3 distanceVector3Plane  = new DistanceVector3Plane3(rectangle.MMCorner, plane);
            DistanceVector3Plane3 distanceVector3Plane2 = new DistanceVector3Plane3(rectangle.MPCorner, plane);
            DistanceVector3Plane3 distanceVector3Plane3 = new DistanceVector3Plane3(rectangle.PMCorner, plane);
            DistanceVector3Plane3 distanceVector3Plane4 = new DistanceVector3Plane3(rectangle.PPCorner, plane);
            double signedDistance  = distanceVector3Plane.SignedDistance;
            double signedDistance2 = distanceVector3Plane2.SignedDistance;
            double signedDistance3 = distanceVector3Plane3.SignedDistance;
            double signedDistance4 = distanceVector3Plane4.SignedDistance;

            if (signedDistance > 0.0 && signedDistance2 > 0.0 && signedDistance3 > 0.0 && signedDistance4 > 0.0)
            {
                this.SignedDistance = Math.Min(signedDistance, Math.Min(signedDistance2, Math.Min(signedDistance3, signedDistance4)));
                return;
            }
            if (signedDistance < 0.0 && signedDistance2 < 0.0 && signedDistance3 < 0.0)
            {
                this.SignedDistance = Math.Max(signedDistance, Math.Max(signedDistance2, Math.Max(signedDistance3, signedDistance4)));
                return;
            }
            this.SignedDistance = 0.0;
        }
Beispiel #8
0
        // Token: 0x060001B0 RID: 432 RVA: 0x00007CC4 File Offset: 0x00005EC4
        public DistanceSegment3Rectangle3(Segment3 segment, Rectangle3 rectangle)
        {
            this = default(DistanceSegment3Rectangle3);
            Line3 line = new Line3(segment.Origin, segment.Direction);
            DistanceLine3Rectangle3 distanceLine3Rectangle = new DistanceLine3Rectangle3(line, rectangle);

            if (distanceLine3Rectangle.LineParameter < -segment.Extent)
            {
                DistanceVector3Rectangle3 distanceVector3Rectangle = new DistanceVector3Rectangle3(segment.NegativeEnd, rectangle);
                this.SquaredDistance         = distanceVector3Rectangle.SquaredDistance;
                this.ClosestPointOnSegment   = segment.NegativeEnd;
                this.ClosestPointOnRectangle = distanceVector3Rectangle.ClosestPointOnRectangle;
                this.SegmentParameter        = -segment.Extent;
                this.RectCoord0 = distanceVector3Rectangle.RectCoord0;
                this.RectCoord1 = distanceVector3Rectangle.RectCoord1;
                return;
            }
            if (distanceLine3Rectangle.LineParameter <= segment.Extent)
            {
                this.SquaredDistance         = distanceLine3Rectangle.SquaredDistance;
                this.ClosestPointOnSegment   = distanceLine3Rectangle.ClosestPointOnLine;
                this.ClosestPointOnRectangle = distanceLine3Rectangle.ClosestPointOnRectangle;
                this.SegmentParameter        = distanceLine3Rectangle.LineParameter;
                this.RectCoord0 = distanceLine3Rectangle.RectCoord0;
                this.RectCoord1 = distanceLine3Rectangle.RectCoord1;
                return;
            }
            DistanceVector3Rectangle3 distanceVector3Rectangle2 = new DistanceVector3Rectangle3(segment.PositiveEnd, rectangle);

            this.SquaredDistance         = distanceVector3Rectangle2.SquaredDistance;
            this.ClosestPointOnSegment   = segment.PositiveEnd;
            this.ClosestPointOnRectangle = distanceVector3Rectangle2.ClosestPointOnRectangle;
            this.SegmentParameter        = segment.Extent;
            this.RectCoord0 = distanceVector3Rectangle2.RectCoord0;
            this.RectCoord1 = distanceVector3Rectangle2.RectCoord1;
        }
Beispiel #9
0
        // Token: 0x0600020F RID: 527 RVA: 0x000093B8 File Offset: 0x000075B8
        public static double DistanceTo(this Vector3 vector3, Rectangle3 rectangle3)
        {
            DistanceVector3Rectangle3 distanceVector3Rectangle = new DistanceVector3Rectangle3(vector3, rectangle3);

            return(distanceVector3Rectangle.Distance);
        }
Beispiel #10
0
        // Token: 0x06000096 RID: 150 RVA: 0x00003A70 File Offset: 0x00001C70
        public static Vector3 ClosestPointTo(this Line3 line3, Rectangle3 rectangle3)
        {
            DistanceLine3Rectangle3 distanceLine3Rectangle = new DistanceLine3Rectangle3(line3, rectangle3);

            return(distanceLine3Rectangle.ClosestPointOnLine);
        }
Beispiel #11
0
        // Token: 0x0600017A RID: 378 RVA: 0x00007394 File Offset: 0x00005594
        public static Segment3 ShortestSegmentTo(this Rectangle3 rectangle, Ray3 ray)
        {
            DistanceRay3Rectangle3 distanceRay3Rectangle = new DistanceRay3Rectangle3(ray, rectangle);

            return(new Segment3(distanceRay3Rectangle.ClosestPointOnRectangle, distanceRay3Rectangle.ClosestPointOnRay));
        }
Beispiel #12
0
 // Token: 0x0600016F RID: 367 RVA: 0x0000726C File Offset: 0x0000546C
 public static double DistanceTo(this Rectangle3 rectangle, Vector3 vector)
 {
     return(vector.DistanceTo(rectangle));
 }
Beispiel #13
0
 // Token: 0x06000175 RID: 373 RVA: 0x00007315 File Offset: 0x00005515
 public static double DistanceTo(this Rectangle3 rectangle, Line3 line)
 {
     return(line.DistanceTo(rectangle));
 }
Beispiel #14
0
        // Token: 0x0600017C RID: 380 RVA: 0x000073E0 File Offset: 0x000055E0
        public static Vector3 ClosestPointTo(this Rectangle3 rectangle, Rectangle3 other)
        {
            DistanceRectangle3Rectangle3 distanceRectangle3Rectangle = new DistanceRectangle3Rectangle3(rectangle, other);

            return(distanceRectangle3Rectangle.ClosestPoint0);
        }
        // Token: 0x060000D9 RID: 217 RVA: 0x000052B4 File Offset: 0x000034B4
        public DistanceLine3Rectangle3(Line3 line, Rectangle3 rectangle)
        {
            this = default(DistanceLine3Rectangle3);
            if (Math.Abs(rectangle.Axis0.Cross(rectangle.Axis1).Dot(line.Direction)) > 1E-08)
            {
                Vector3          vector          = line.Origin - rectangle.Center;
                UnitVector3      direction       = line.Direction;
                AffineTransform3 affineTransform = Transform3Factory.CreateOrthonormalBasis(direction);
                double           num             = affineTransform.AxisX.Dot(rectangle.Axis0);
                double           num2            = affineTransform.AxisX.Dot(rectangle.Axis1);
                double           num3            = affineTransform.AxisX.Dot(vector);
                double           num4            = affineTransform.AxisY.Dot(rectangle.Axis0);
                double           num5            = affineTransform.AxisY.Dot(rectangle.Axis1);
                double           num6            = affineTransform.AxisY.Dot(vector);
                double           num7            = 1.0 / (num * num5 - num2 * num4);
                double           num8            = (num5 * num3 - num2 * num6) * num7;
                double           num9            = (num * num6 - num4 * num3) * num7;
                if (Math.Abs(num8) <= rectangle.Extent0 && Math.Abs(num9) <= rectangle.Extent1)
                {
                    double num10 = direction.Dot(rectangle.Axis0);
                    double num11 = direction.Dot(rectangle.Axis1);
                    double num12 = line.Direction.Dot(vector);
                    this.LineParameter           = num8 * num10 + num9 * num11 - num12;
                    this.RectCoord0              = num8;
                    this.RectCoord1              = num9;
                    this.ClosestPointOnLine      = line.Origin + this.LineParameter * line.Direction;
                    this.ClosestPointOnRectangle = rectangle.Center + num8 * rectangle.Axis0 + num9 * rectangle.Axis1;
                    this.SquaredDistance         = 0.0;
                    return;
                }
            }
            double num13 = double.MaxValue;

            Vector3[] array = new Vector3[]
            {
                rectangle.Extent0 *rectangle.Axis0,
                rectangle.Extent1 *rectangle.Axis1
            };
            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 2; j++)
                {
                    Vector3               origin               = rectangle.Center + (double)(2 * j - 1) * array[i];
                    UnitVector3           direction2           = (i == 0) ? rectangle.Axis1 : rectangle.Axis0;
                    double                extent               = (i == 0) ? rectangle.Extent1 : rectangle.Extent0;
                    Segment3              segment              = new Segment3(origin, direction2, extent);
                    DistanceLine3Segment3 distanceLine3Segment = new DistanceLine3Segment3(line, segment);
                    double                squaredDistance      = distanceLine3Segment.SquaredDistance;
                    if (squaredDistance < num13)
                    {
                        this.ClosestPointOnLine      = distanceLine3Segment.ClosestPointOnLine;
                        this.ClosestPointOnRectangle = distanceLine3Segment.ClosestPointOnSegment;
                        num13 = squaredDistance;
                        this.LineParameter = distanceLine3Segment.LineParameter;
                        double num14 = distanceLine3Segment.SegmentParameter / segment.Extent;
                        this.RectCoord0 = rectangle.Extent0 * ((double)((1 - i) * (2 * j - 1)) + (double)i * num14);
                        this.RectCoord1 = rectangle.Extent1 * ((double)((1 - j) * (2 * i - 1)) + (double)j * num14);
                    }
                }
            }
            this.SquaredDistance = num13;
        }
Beispiel #16
0
        // Token: 0x06000173 RID: 371 RVA: 0x000072CC File Offset: 0x000054CC
        public static Vector3 ClosestPointTo(this Rectangle3 rectangle, Segment3 segment)
        {
            DistanceSegment3Rectangle3 distanceSegment3Rectangle = new DistanceSegment3Rectangle3(segment, rectangle);

            return(distanceSegment3Rectangle.ClosestPointOnRectangle);
        }
Beispiel #17
0
        // Token: 0x06000174 RID: 372 RVA: 0x000072EC File Offset: 0x000054EC
        public static Segment3 ShortestSegmentTo(this Rectangle3 rectangle, Segment3 segment)
        {
            DistanceSegment3Rectangle3 distanceSegment3Rectangle = new DistanceSegment3Rectangle3(segment, rectangle);

            return(new Segment3(distanceSegment3Rectangle.ClosestPointOnRectangle, distanceSegment3Rectangle.ClosestPointOnSegment));
        }
Beispiel #18
0
        // Token: 0x0600017D RID: 381 RVA: 0x00007400 File Offset: 0x00005600
        public static Segment3 ShortestSegmentTo(this Rectangle3 rectangle, Rectangle3 other)
        {
            DistanceRectangle3Rectangle3 distanceRectangle3Rectangle = new DistanceRectangle3Rectangle3(rectangle, other);

            return(new Segment3(distanceRectangle3Rectangle.ClosestPoint0, distanceRectangle3Rectangle.ClosestPoint1));
        }
Beispiel #19
0
 // Token: 0x06000178 RID: 376 RVA: 0x00007369 File Offset: 0x00005569
 public static double DistanceTo(this Rectangle3 rectangle, Ray3 ray)
 {
     return(ray.DistanceTo(rectangle));
 }
Beispiel #20
0
        // Token: 0x0600017E RID: 382 RVA: 0x0000742C File Offset: 0x0000562C
        public static double DistanceTo(this Rectangle3 rectangle, Triangle3 triangle)
        {
            DistanceTriangle3Rectangle3 distanceTriangle3Rectangle = new DistanceTriangle3Rectangle3(triangle, rectangle);

            return(distanceTriangle3Rectangle.Distance);
        }
Beispiel #21
0
        // Token: 0x06000179 RID: 377 RVA: 0x00007374 File Offset: 0x00005574
        public static Vector3 ClosestPointTo(this Rectangle3 rectangle, Ray3 ray)
        {
            DistanceRay3Rectangle3 distanceRay3Rectangle = new DistanceRay3Rectangle3(ray, rectangle);

            return(distanceRay3Rectangle.ClosestPointOnRectangle);
        }
Beispiel #22
0
        // Token: 0x0600017F RID: 383 RVA: 0x0000744C File Offset: 0x0000564C
        public static Vector3 ClosestPointTo(this Rectangle3 rectangle, Triangle3 triangle)
        {
            DistanceTriangle3Rectangle3 distanceTriangle3Rectangle = new DistanceTriangle3Rectangle3(triangle, rectangle);

            return(distanceTriangle3Rectangle.ClosestPointOnRectangle);
        }
Beispiel #23
0
        // Token: 0x0600017B RID: 379 RVA: 0x000073C0 File Offset: 0x000055C0
        public static double DistanceTo(this Rectangle3 rectangle, Rectangle3 other)
        {
            DistanceRectangle3Rectangle3 distanceRectangle3Rectangle = new DistanceRectangle3Rectangle3(rectangle, other);

            return(distanceRectangle3Rectangle.Distance);
        }
Beispiel #24
0
        // Token: 0x06000180 RID: 384 RVA: 0x0000746C File Offset: 0x0000566C
        public static Segment3 ShortestSegmentTo(this Rectangle3 rectangle, Triangle3 triangle)
        {
            DistanceTriangle3Rectangle3 distanceTriangle3Rectangle = new DistanceTriangle3Rectangle3(triangle, rectangle);

            return(new Segment3(distanceTriangle3Rectangle.ClosestPointOnRectangle, distanceTriangle3Rectangle.ClosestPointOnTriangle));
        }
Beispiel #25
0
        // Token: 0x06000095 RID: 149 RVA: 0x00003A50 File Offset: 0x00001C50
        public static double DistanceTo(this Line3 line3, Rectangle3 rectangle3)
        {
            DistanceLine3Rectangle3 distanceLine3Rectangle = new DistanceLine3Rectangle3(line3, rectangle3);

            return(distanceLine3Rectangle.Distance);
        }
Beispiel #26
0
        // Token: 0x06000170 RID: 368 RVA: 0x00007278 File Offset: 0x00005478
        public static Vector3 ClosestPointTo(this Rectangle3 rectangle, Vector3 vector)
        {
            DistanceVector3Rectangle3 distanceVector3Rectangle = new DistanceVector3Rectangle3(vector, rectangle);

            return(distanceVector3Rectangle.ClosestPointOnRectangle);
        }
Beispiel #27
0
        // Token: 0x06000097 RID: 151 RVA: 0x00003A90 File Offset: 0x00001C90
        public static Segment3 ShortestSegmentTo(this Line3 line3, Rectangle3 rectangle3)
        {
            DistanceLine3Rectangle3 distanceLine3Rectangle = new DistanceLine3Rectangle3(line3, rectangle3);

            return(new Segment3(distanceLine3Rectangle.ClosestPointOnLine, distanceLine3Rectangle.ClosestPointOnRectangle));
        }
Beispiel #28
0
        // Token: 0x06000182 RID: 386 RVA: 0x000074B8 File Offset: 0x000056B8
        public static double SignedDistanceTo(this Rectangle3 rectangle, Plane3 plane)
        {
            DistancePlane3Rectangle3 distancePlane3Rectangle = new DistancePlane3Rectangle3(plane, rectangle);

            return(distancePlane3Rectangle.SignedDistance);
        }
Beispiel #29
0
        // Token: 0x06000210 RID: 528 RVA: 0x000093D8 File Offset: 0x000075D8
        public static Segment3 ShortestSegmentTo(this Vector3 vector3, Rectangle3 rectangle3)
        {
            DistanceVector3Rectangle3 distanceVector3Rectangle = new DistanceVector3Rectangle3(vector3, rectangle3);

            return(new Segment3(distanceVector3Rectangle.ClosestPointOnVector, distanceVector3Rectangle.ClosestPointOnRectangle));
        }
Beispiel #30
0
 // Token: 0x06000172 RID: 370 RVA: 0x000072C1 File Offset: 0x000054C1
 public static double DistanceTo(this Rectangle3 rectangle, Segment3 segment)
 {
     return(segment.DistanceTo(rectangle));
 }