// Token: 0x06000289 RID: 649 RVA: 0x0000AA74 File Offset: 0x00008C74 public bool Find() { this.Quantity = 0; IntersectionLine2Arc2 intersectionLine2Arc = new IntersectionLine2Arc2(new Line2(this.ray.Origin, this.ray.Direction), this.arc); if (intersectionLine2Arc.Find()) { if (intersectionLine2Arc.Quantity == 2) { if (intersectionLine2Arc.Parameter0 >= 0.0 && intersectionLine2Arc.Parameter1 >= 0.0) { this.Point0 = intersectionLine2Arc.Point0; this.Point1 = intersectionLine2Arc.Point1; this.Quantity = 2; } else if (intersectionLine2Arc.Parameter0 < 0.0 && intersectionLine2Arc.Parameter1 >= 0.0) { this.Point0 = intersectionLine2Arc.Point1; this.Quantity = 1; } } else if (intersectionLine2Arc.Parameter0 >= 0.0) { this.Point0 = intersectionLine2Arc.Point0; this.Quantity = 1; } } this.IntersectionType = ((this.Quantity > 0) ? Intersection.Type.IT_POINT : Intersection.Type.IT_EMPTY); return(this.IntersectionType > Intersection.Type.IT_EMPTY); }
/// <summary> /// /// </summary> /// <param name="line"></param> /// <param name="arc"></param> /// <returns></returns> public static ICollection <Vector2> IntersectionPointsWith(this Line2 line, Arc2 arc) { IntersectionLine2Arc2 intersectionLine2Arc = new IntersectionLine2Arc2(line, arc); intersectionLine2Arc.Find(); List <Vector2> list = new List <Vector2>(); Vector2[] array = new Vector2[] { intersectionLine2Arc.Point0, intersectionLine2Arc.Point1 }; for (int i = 0; i < intersectionLine2Arc.Quantity; i++) { list.Add(array[i]); } return(list); }
// Token: 0x0600033B RID: 827 RVA: 0x0000DD6C File Offset: 0x0000BF6C public static bool Intersects(this Line2 line, Arc2 arc) { IntersectionLine2Arc2 intersectionLine2Arc = new IntersectionLine2Arc2(line, arc); return(intersectionLine2Arc.Find()); }