示例#1
0
        // Token: 0x060002B8 RID: 696 RVA: 0x0000B2BC File Offset: 0x000094BC
        public bool Find()
        {
            int quantity;

            double[] roots = IntersectionLine3Torus3.GetRoots(this.line, this.torus, out quantity);
            this.Quantity = quantity;
            Vector3[] array = new Vector3[4];
            for (int i = 0; i < this.Quantity; i++)
            {
                array[i] = this.line.Origin + roots[i] * this.line.Direction;
            }
            this.Point0           = array[0];
            this.Point1           = array[1];
            this.Point2           = array[2];
            this.Point3           = array[3];
            this.IntersectionType = ((this.Quantity > 0) ? Intersection.Type.IT_POINT : Intersection.Type.IT_EMPTY);
            return(this.IntersectionType > Intersection.Type.IT_EMPTY);
        }
        // Token: 0x060002A9 RID: 681 RVA: 0x0000AFE0 File Offset: 0x000091E0
        public bool Find()
        {
            int num;

            double[] roots = IntersectionLine3Torus3.GetRoots(new Line3(this.ray.Origin, this.ray.Direction), this.torus, out num);
            this.Quantity = 0;
            Vector3[] array = new Vector3[4];
            for (int i = 0; i < num; i++)
            {
                if (roots[i] >= 0.0)
                {
                    Vector3[] array2   = array;
                    int       quantity = this.Quantity;
                    this.Quantity    = quantity + 1;
                    array2[quantity] = this.ray.Origin + roots[i] * this.ray.Direction;
                }
            }
            this.Point0           = array[0];
            this.Point1           = array[1];
            this.Point2           = array[2];
            this.Point3           = array[3];
            this.IntersectionType = ((this.Quantity > 0) ? Intersection.Type.IT_POINT : Intersection.Type.IT_EMPTY);
            return(this.IntersectionType > Intersection.Type.IT_EMPTY);
        }