Ejemplo n.º 1
0
        // Token: 0x0600000D RID: 13 RVA: 0x000022B0 File Offset: 0x000004B0
        public static double DistanceTo(this AxisAlignedBox3 axisAlignedBox3, Line3 line3)
        {
            Box3 box = new Box3(axisAlignedBox3.Center, UnitVector3.UnitX, UnitVector3.UnitY, UnitVector3.UnitZ, axisAlignedBox3.ExtentX, axisAlignedBox3.ExtentY, axisAlignedBox3.ExtentZ);

            return(line3.DistanceTo(box));
        }
Ejemplo n.º 2
0
 // Token: 0x0600025D RID: 605 RVA: 0x0000A3E7 File Offset: 0x000085E7
 public static bool Intersects(this Torus3 torus, Line3 line)
 {
     return(line.Intersects(torus));
 }
Ejemplo n.º 3
0
        // Token: 0x0600003A RID: 58 RVA: 0x00002AE8 File Offset: 0x00000CE8
        public static Vector3 ClosestPointTo(this Circle3 circle3, Line3 line3)
        {
            DistanceLine3Circle3 distanceLine3Circle = new DistanceLine3Circle3(line3, circle3);

            return(distanceLine3Circle.ClosestPointOnCircle);
        }
Ejemplo n.º 4
0
 // Token: 0x06000033 RID: 51 RVA: 0x00002A1D File Offset: 0x00000C1D
 public static double DistanceTo(this Box3 box3, Line3 line3)
 {
     return(line3.DistanceTo(box3));
 }
Ejemplo n.º 5
0
        // Token: 0x06000035 RID: 53 RVA: 0x00002A48 File Offset: 0x00000C48
        public static Segment3 ShortestSegmentTo(this Box3 box3, Line3 line3)
        {
            DistanceLine3Box3 distanceLine3Box = new DistanceLine3Box3(line3, box3);

            return(new Segment3(distanceLine3Box.ClosestPointOnBox, distanceLine3Box.ClosestPointOnLine));
        }
Ejemplo n.º 6
0
 // Token: 0x06000382 RID: 898 RVA: 0x0000F6BE File Offset: 0x0000D8BE
 public IntersectionLine3Triangle3(Line3 line, Triangle3 triangle)
 {
     this          = default(IntersectionLine3Triangle3);
     this.line     = line;
     this.triangle = triangle;
 }
 // Token: 0x06000311 RID: 785 RVA: 0x0000C836 File Offset: 0x0000AA36
 public static Segment3?IntersectionWith(this AxisAlignedBox3 axisAlignedBox3, Line3 line3)
 {
     return(line3.IntersectionWith(axisAlignedBox3));
 }
Ejemplo n.º 8
0
        // Token: 0x060001DE RID: 478 RVA: 0x00008B84 File Offset: 0x00006D84
        public static Vector3 ClosestPointTo(this Triangle3 triangle3, Line3 line3)
        {
            DistanceLine3Triangle3 distanceLine3Triangle = new DistanceLine3Triangle3(line3, triangle3);

            return(distanceLine3Triangle.ClosestPointOnTriangle);
        }
Ejemplo n.º 9
0
        // Token: 0x060001DF RID: 479 RVA: 0x00008BA4 File Offset: 0x00006DA4
        public static Segment3 ShortestSegmentTo(this Triangle3 triangle3, Line3 line3)
        {
            DistanceLine3Triangle3 distanceLine3Triangle = new DistanceLine3Triangle3(line3, triangle3);

            return(new Segment3(distanceLine3Triangle.ClosestPointOnTriangle, distanceLine3Triangle.ClosestPointOnLine));
        }
Ejemplo n.º 10
0
        // Token: 0x0600011A RID: 282 RVA: 0x00006148 File Offset: 0x00004348
        public static Segment3 ShortestSegmentTo(this Ray3 ray3, Line3 line3)
        {
            DistanceLine3Ray3 distanceLine3Ray = new DistanceLine3Ray3(line3, ray3);

            return(new Segment3(distanceLine3Ray.ClosestPointOnRay, distanceLine3Ray.ClosestPointOnLine));
        }
Ejemplo n.º 11
0
 // Token: 0x060001DD RID: 477 RVA: 0x00008B79 File Offset: 0x00006D79
 public static double DistanceTo(this Triangle3 triangle3, Line3 line3)
 {
     return(line3.DistanceTo(triangle3));
 }
Ejemplo n.º 12
0
        // Token: 0x06000119 RID: 281 RVA: 0x00006128 File Offset: 0x00004328
        public static Vector3 ClosestPointTo(this Ray3 ray3, Line3 line3)
        {
            DistanceLine3Ray3 distanceLine3Ray = new DistanceLine3Ray3(line3, ray3);

            return(distanceLine3Ray.ClosestPointOnRay);
        }
Ejemplo n.º 13
0
 // Token: 0x06000118 RID: 280 RVA: 0x0000611D File Offset: 0x0000431D
 public static double DistanceTo(this Ray3 ray3, Line3 line3)
 {
     return(line3.DistanceTo(ray3));
 }
Ejemplo n.º 14
0
        // Token: 0x0600000F RID: 15 RVA: 0x00002348 File Offset: 0x00000548
        public static Segment3 ShortestSegmentTo(this AxisAlignedBox3 axisAlignedBox3, Line3 line3)
        {
            Box3 box = new Box3(axisAlignedBox3.Center, UnitVector3.UnitX, UnitVector3.UnitY, UnitVector3.UnitZ, axisAlignedBox3.ExtentX, axisAlignedBox3.ExtentY, axisAlignedBox3.ExtentZ);
            DistanceLine3Box3 distanceLine3Box = new DistanceLine3Box3(line3, box);

            return(new Segment3(distanceLine3Box.ClosestPointOnBox, distanceLine3Box.ClosestPointOnLine));
        }
Ejemplo n.º 15
0
        // Token: 0x060000F3 RID: 243 RVA: 0x000058E0 File Offset: 0x00003AE0
        public DistanceLine3Triangle3(Line3 line, Triangle3 triangle)
        {
            this = default(DistanceLine3Triangle3);
            Vector3     vector  = triangle.V1 - triangle.V0;
            Vector3     vector2 = triangle.V2 - triangle.V0;
            UnitVector3 unitVector;

            if (vector.TryGetUnitCross(vector2, out unitVector) && Math.Abs(unitVector.Dot(line.Direction)) > 1E-08)
            {
                Vector3          vector3         = line.Origin - triangle.V0;
                UnitVector3      direction       = line.Direction;
                AffineTransform3 affineTransform = Transform3Factory.CreateOrthonormalBasis(direction);
                double           num             = affineTransform.AxisX.Dot(vector);
                double           num2            = affineTransform.AxisX.Dot(vector2);
                double           num3            = affineTransform.AxisX.Dot(vector3);
                double           num4            = affineTransform.AxisY.Dot(vector);
                double           num5            = affineTransform.AxisY.Dot(vector2);
                double           num6            = affineTransform.AxisY.Dot(vector3);
                double           num7            = 1.0 / (num * num5 - num2 * num4);
                double           num8            = (num5 * num3 - num2 * num6) * num7;
                double           num9            = (num * num6 - num4 * num3) * num7;
                double           num10           = 1.0 - num8 - num9;
                if (num10 >= 0.0 && num8 >= 0.0 && num9 >= 0.0)
                {
                    double num11 = direction.Dot(vector);
                    double num12 = direction.Dot(vector2);
                    double num13 = line.Direction.Dot(vector3);
                    this.LineParameter          = num8 * num11 + num9 * num12 - num13;
                    this.TriangleBary0          = num10;
                    this.TriangleBary1          = num8;
                    this.TriangleBary2          = num9;
                    this.ClosestPointOnLine     = line.Origin + this.LineParameter * line.Direction;
                    this.ClosestPointOnTriangle = triangle.V0 + num8 * vector + num9 * vector2;
                    this.SquaredDistance        = 0.0;
                    return;
                }
            }
            Segment3 segment = new Segment3(triangle.V2, triangle.V0);
            DistanceLine3Segment3 distanceLine3Segment = new DistanceLine3Segment3(line, segment);

            this.ClosestPointOnLine     = distanceLine3Segment.ClosestPointOnLine;
            this.ClosestPointOnTriangle = distanceLine3Segment.ClosestPointOnSegment;
            this.SquaredDistance        = distanceLine3Segment.SquaredDistance;
            this.LineParameter          = distanceLine3Segment.LineParameter;
            this.TriangleBary2          = 0.5 * (1.0 - distanceLine3Segment.SegmentParameter / segment.Extent);
            this.TriangleBary0          = 1.0 - this.TriangleBary2;
            this.TriangleBary1          = 0.0;
            Segment3 segment2 = new Segment3(triangle.V0, triangle.V1);
            DistanceLine3Segment3 distanceLine3Segment2 = new DistanceLine3Segment3(line, segment2);

            if (distanceLine3Segment2.SquaredDistance < this.SquaredDistance)
            {
                this.ClosestPointOnLine     = distanceLine3Segment2.ClosestPointOnLine;
                this.ClosestPointOnTriangle = distanceLine3Segment2.ClosestPointOnSegment;
                this.SquaredDistance        = distanceLine3Segment2.SquaredDistance;
                this.LineParameter          = distanceLine3Segment2.LineParameter;
                this.TriangleBary0          = 0.5 * (1.0 - distanceLine3Segment2.SegmentParameter / segment2.Extent);
                this.TriangleBary1          = 1.0 - this.TriangleBary0;
                this.TriangleBary2          = 0.0;
            }
            Segment3 segment3 = new Segment3(triangle.V1, triangle.V2);
            DistanceLine3Segment3 distanceLine3Segment3 = new DistanceLine3Segment3(line, segment3);

            if (distanceLine3Segment3.SquaredDistance < this.SquaredDistance)
            {
                this.ClosestPointOnLine     = distanceLine3Segment3.ClosestPointOnLine;
                this.ClosestPointOnTriangle = distanceLine3Segment3.ClosestPointOnSegment;
                this.SquaredDistance        = distanceLine3Segment3.SquaredDistance;
                this.LineParameter          = distanceLine3Segment3.LineParameter;
                this.TriangleBary1          = 0.5 * (1.0 - distanceLine3Segment3.SegmentParameter / segment3.Extent);
                this.TriangleBary2          = 1.0 - this.TriangleBary1;
                this.TriangleBary0          = 0.0;
            }
        }
Ejemplo n.º 16
0
        // Token: 0x0600010C RID: 268 RVA: 0x00005EC4 File Offset: 0x000040C4
        public static double SignedDistanceTo(this Plane3 plane3, Line3 line3)
        {
            DistancePlane3Line3 distancePlane3Line = new DistancePlane3Line3(plane3, line3);

            return(distancePlane3Line.SignedDistance);
        }
Ejemplo n.º 17
0
 // Token: 0x06000370 RID: 880 RVA: 0x0000ED46 File Offset: 0x0000CF46
 public IntersectionLine3Box3(Line3 line, Box3 box)
 {
     this      = default(IntersectionLine3Box3);
     this.line = line;
     this.box  = box;
 }
Ejemplo n.º 18
0
 // Token: 0x0600044B RID: 1099 RVA: 0x0001396E File Offset: 0x00011B6E
 public static bool Intersects(this Triangle3 triangle, Line3 line)
 {
     return(line.Intersects(triangle));
 }
 // Token: 0x06000310 RID: 784 RVA: 0x0000C82D File Offset: 0x0000AA2D
 public static bool Intersects(this AxisAlignedBox3 axisAlignedBox3, Line3 line3)
 {
     return(line3.Intersects(axisAlignedBox3));
 }
Ejemplo n.º 20
0
 // Token: 0x0600044C RID: 1100 RVA: 0x00013977 File Offset: 0x00011B77
 public static Vector3?IntersectionWith(this Triangle3 triangle, Line3 line)
 {
     return(line.IntersectionWith(triangle));
 }
 // Token: 0x06000312 RID: 786 RVA: 0x0000C83F File Offset: 0x0000AA3F
 public static ICollection <Vector3> IntersectionPointsWith(this AxisAlignedBox3 axisAlignedBox3, Line3 line3)
 {
     return(line3.IntersectionPointsWith(axisAlignedBox3));
 }
Ejemplo n.º 22
0
 // Token: 0x0600037B RID: 891 RVA: 0x0000F526 File Offset: 0x0000D726
 public IntersectionLine3Plane3(Line3 line, Plane3 plane)
 {
     this       = default(IntersectionLine3Plane3);
     this.line  = line;
     this.plane = plane;
 }
Ejemplo n.º 23
0
        // Token: 0x06000034 RID: 52 RVA: 0x00002A28 File Offset: 0x00000C28
        public static Vector3 ClosestPointTo(this Box3 box3, Line3 line3)
        {
            DistanceLine3Box3 distanceLine3Box = new DistanceLine3Box3(line3, box3);

            return(distanceLine3Box.ClosestPointOnBox);
        }
Ejemplo n.º 24
0
 // Token: 0x06000272 RID: 626 RVA: 0x0000A606 File Offset: 0x00008806
 public static Segment3?IntersectionWith(this Cylinder3 cylinder, Line3 line)
 {
     return(line.IntersectionWith(cylinder));
 }
Ejemplo n.º 25
0
 // Token: 0x0600025E RID: 606 RVA: 0x0000A3F0 File Offset: 0x000085F0
 public static ICollection <Vector3> IntersectionPointsWith(this Torus3 torus, Line3 line)
 {
     return(line.IntersectionPointsWith(torus));
 }
Ejemplo n.º 26
0
 // Token: 0x06000273 RID: 627 RVA: 0x0000A60F File Offset: 0x0000880F
 public static ICollection <Vector3> IntersectionPointsWith(this Cylinder3 cylinder, Line3 line)
 {
     return(line.IntersectionPointsWith(cylinder));
 }
Ejemplo n.º 27
0
        // Token: 0x06000039 RID: 57 RVA: 0x00002AC8 File Offset: 0x00000CC8
        public static double DistanceTo(this Circle3 circle3, Line3 line3)
        {
            DistanceLine3Circle3 distanceLine3Circle = new DistanceLine3Circle3(line3, circle3);

            return(distanceLine3Circle.Distance);
        }
Ejemplo n.º 28
0
 // Token: 0x06000271 RID: 625 RVA: 0x0000A5FD File Offset: 0x000087FD
 public static bool Intersects(this Cylinder3 cylinder, Line3 line)
 {
     return(line.Intersects(cylinder));
 }
Ejemplo n.º 29
0
        // Token: 0x0600003B RID: 59 RVA: 0x00002B08 File Offset: 0x00000D08
        public static Segment3 ShortestSegmentTo(this Circle3 circle3, Line3 line3)
        {
            DistanceLine3Circle3 distanceLine3Circle = new DistanceLine3Circle3(line3, circle3);

            return(new Segment3(distanceLine3Circle.ClosestPointOnCircle, distanceLine3Circle.ClosestPointOnLine));
        }
Ejemplo n.º 30
0
        // Token: 0x06000190 RID: 400 RVA: 0x00007774 File Offset: 0x00005974
        public static Segment3 ShortestSegmentTo(this Segment3 segment3, Line3 line3)
        {
            DistanceLine3Segment3 distanceLine3Segment = new DistanceLine3Segment3(line3, segment3);

            return(new Segment3(distanceLine3Segment.ClosestPointOnSegment, distanceLine3Segment.ClosestPointOnLine));
        }