// Token: 0x060003E8 RID: 1000 RVA: 0x000118EC File Offset: 0x0000FAEC public static bool Intersects(this Segment2 segment, AxisAlignedBox2 axisAlignedBox) { Box2 box = new Box2(axisAlignedBox.Center, UnitVector2.UnitX, UnitVector2.UnitY, axisAlignedBox.ExtentX, axisAlignedBox.ExtentY); IntersectionSegment2Box2 intersectionSegment2Box = new IntersectionSegment2Box2(segment, box, true); return(intersectionSegment2Box.Test()); }
// Token: 0x060003EE RID: 1006 RVA: 0x00011A9C File Offset: 0x0000FC9C public static Segment2?IntersectionWith(this Segment2 segment, Box2 box) { IntersectionSegment2Box2 intersectionSegment2Box = new IntersectionSegment2Box2(segment, box, true); bool flag = intersectionSegment2Box.Find(); if (flag && intersectionSegment2Box.IntersectionType == Intersection.Type.IT_SEGMENT) { return(new Segment2?(new Segment2(intersectionSegment2Box.Point0, intersectionSegment2Box.Point1))); } if (flag && intersectionSegment2Box.IntersectionType == Intersection.Type.IT_POINT) { return(new Segment2?(new Segment2(intersectionSegment2Box.Point0, segment.Direction, 0.0))); } return(null); }
// Token: 0x060003E9 RID: 1001 RVA: 0x00011930 File Offset: 0x0000FB30 public static Segment2?IntersectionWith(this Segment2 segment, AxisAlignedBox2 axisAlignedBox) { Box2 box = new Box2(axisAlignedBox.Center, UnitVector2.UnitX, UnitVector2.UnitY, axisAlignedBox.ExtentX, axisAlignedBox.ExtentY); IntersectionSegment2Box2 intersectionSegment2Box = new IntersectionSegment2Box2(segment, box, true); bool flag = intersectionSegment2Box.Find(); if (flag && intersectionSegment2Box.IntersectionType == Intersection.Type.IT_SEGMENT) { return(new Segment2?(new Segment2(intersectionSegment2Box.Point0, intersectionSegment2Box.Point1))); } if (flag && intersectionSegment2Box.IntersectionType == Intersection.Type.IT_POINT) { return(new Segment2?(new Segment2(intersectionSegment2Box.Point0, segment.Direction, 0.0))); } return(null); }
// Token: 0x060003EF RID: 1007 RVA: 0x00011B1C File Offset: 0x0000FD1C public static ICollection <Vector2> IntersectionPointsWith(this Segment2 segment, Box2 box) { IntersectionSegment2Box2 intersectionSegment2Box = new IntersectionSegment2Box2(segment, box, true); intersectionSegment2Box.Find(); List <Vector2> list = new List <Vector2>(); Vector2[] array = new Vector2[] { intersectionSegment2Box.Point0, intersectionSegment2Box.Point1 }; for (int i = 0; i < intersectionSegment2Box.Quantity; i++) { list.Add(array[i]); } return(list); }
// Token: 0x060003EA RID: 1002 RVA: 0x000119D4 File Offset: 0x0000FBD4 public static ICollection <Vector2> IntersectionPointsWith(this Segment2 segment, AxisAlignedBox2 axisAlignedBox) { Box2 box = new Box2(axisAlignedBox.Center, UnitVector2.UnitX, UnitVector2.UnitY, axisAlignedBox.ExtentX, axisAlignedBox.ExtentY); IntersectionSegment2Box2 intersectionSegment2Box = new IntersectionSegment2Box2(segment, box, true); intersectionSegment2Box.Find(); List <Vector2> list = new List <Vector2>(); Vector2[] array = new Vector2[] { intersectionSegment2Box.Point0, intersectionSegment2Box.Point1 }; for (int i = 0; i < intersectionSegment2Box.Quantity; i++) { list.Add(array[i]); } return(list); }
// Token: 0x060003ED RID: 1005 RVA: 0x00011A7C File Offset: 0x0000FC7C public static bool Intersects(this Segment2 segment, Box2 box) { IntersectionSegment2Box2 intersectionSegment2Box = new IntersectionSegment2Box2(segment, box, true); return(intersectionSegment2Box.Test()); }