// Token: 0x06000407 RID: 1031 RVA: 0x00011FA8 File Offset: 0x000101A8 public bool Test() { double[] dist = new double[3]; int[] sign = new int[3]; int num; int num2; int num3; IntersectionLine2Triangle2.TriangleLineRelations(this.segment.Origin, this.segment.Direction, this.triangle, ref dist, ref sign, out num, out num2, out num3); if (num == 3 || num2 == 3) { this.IntersectionType = Intersection.Type.IT_EMPTY; } else { double[] array = new double[2]; IntersectionLine2Triangle2.GetInterval(this.segment.Origin, this.segment.Direction, this.triangle, dist, sign, ref array); Intersector1 intersector = new Intersector1(array[0], array[1], -this.segment.Extent, this.segment.Extent); intersector.Find(); this.Quantity = intersector.Quantity; if (this.Quantity == 2) { this.IntersectionType = Intersection.Type.IT_SEGMENT; } else if (this.Quantity == 1) { this.IntersectionType = Intersection.Type.IT_POINT; } else { this.IntersectionType = Intersection.Type.IT_EMPTY; } } return(this.IntersectionType > Intersection.Type.IT_EMPTY); }
// Token: 0x0600035E RID: 862 RVA: 0x0000E530 File Offset: 0x0000C730 public bool Find() { double[] dist = new double[3]; int[] sign = new int[3]; int num; int num2; int num3; IntersectionLine2Triangle2.TriangleLineRelations(this.line.Origin, this.line.Direction, this.triangle, ref dist, ref sign, out num, out num2, out num3); if (num == 3 || num2 == 3) { this.Quantity = 0; this.IntersectionType = Intersection.Type.IT_EMPTY; } else { double[] array = new double[2]; IntersectionLine2Triangle2.GetInterval(this.line.Origin, this.line.Direction, this.triangle, dist, sign, ref array); Intersector1 intersector = new Intersector1(array[0], array[1], double.MinValue, double.MaxValue); intersector.Find(); this.Quantity = intersector.Quantity; if (this.Quantity == 2) { this.IntersectionType = Intersection.Type.IT_SEGMENT; this.Point0 = this.line.Origin + intersector.Overlap0 * this.line.Direction; this.Point1 = this.line.Origin + intersector.Overlap1 * this.line.Direction; } else if (this.Quantity == 1) { this.IntersectionType = Intersection.Type.IT_POINT; this.Point0 = this.line.Origin + intersector.Overlap0 * this.line.Direction; } else { this.IntersectionType = Intersection.Type.IT_EMPTY; } } return(this.IntersectionType > Intersection.Type.IT_EMPTY); }