Exemplo n.º 1
0
        // Token: 0x0600026A RID: 618 RVA: 0x0000A560 File Offset: 0x00008760
        public static ICollection <Vector2> IntersectionPointsWith(this Circle2 circle, Circle2 other)
        {
            IntersectionCircle2Circle2 intersectionCircle2Circle = new IntersectionCircle2Circle2(circle, other);

            intersectionCircle2Circle.Find();
            List <Vector2> list = new List <Vector2>();

            Vector2[] array = new Vector2[]
            {
                intersectionCircle2Circle.Point0,
                intersectionCircle2Circle.Point1
            };
            for (int i = 0; i < intersectionCircle2Circle.Quantity; i++)
            {
                list.Add(array[i]);
            }
            return(list);
        }
Exemplo n.º 2
0
        // Token: 0x060002C2 RID: 706 RVA: 0x0000B3DC File Offset: 0x000095DC
        public bool Find()
        {
            this.Quantity = 0;
            IntersectionCircle2Circle2 intersectionCircle2Circle = new IntersectionCircle2Circle2(this.circle, this.arc.Circle);

            if (!intersectionCircle2Circle.Find())
            {
                this.IntersectionType = Intersection.Type.IT_EMPTY;
                return(false);
            }
            if (intersectionCircle2Circle.IntersectionType == Intersection.Type.IT_OTHER)
            {
                this.IntersectionType = Intersection.Type.IT_OTHER;
                return(true);
            }
            Vector2[] array = new Vector2[]
            {
                intersectionCircle2Circle.Point0,
                intersectionCircle2Circle.Point1
            };
            for (int i = 0; i < intersectionCircle2Circle.Quantity; i++)
            {
                if (IntersectionArc2Arc2.Contains(this.arc, array[i]))
                {
                    int quantity = this.Quantity;
                    this.Quantity = quantity + 1;
                    if (quantity == 0)
                    {
                        this.Point0 = array[i];
                    }
                    else
                    {
                        this.Point1 = array[i];
                    }
                }
            }
            this.IntersectionType = ((this.Quantity > 0) ? Intersection.Type.IT_POINT : Intersection.Type.IT_EMPTY);
            return(this.IntersectionType > Intersection.Type.IT_EMPTY);
        }
Exemplo n.º 3
0
        // Token: 0x06000269 RID: 617 RVA: 0x0000A540 File Offset: 0x00008740
        public static bool Intersects(this Circle2 circle, Circle2 other)
        {
            IntersectionCircle2Circle2 intersectionCircle2Circle = new IntersectionCircle2Circle2(circle, other);

            return(intersectionCircle2Circle.Find());
        }
Exemplo n.º 4
0
        // Token: 0x060002CE RID: 718 RVA: 0x0000B534 File Offset: 0x00009734
        public bool Find()
        {
            this.Quantity = 0;
            Circle2 circle  = this.arc0.Circle;
            Circle2 circle2 = this.arc1.Circle;
            IntersectionCircle2Circle2 intersectionCircle2Circle = new IntersectionCircle2Circle2(circle, circle2);

            if (!intersectionCircle2Circle.Find())
            {
                this.IntersectionType = Intersection.Type.IT_EMPTY;
                return(false);
            }
            if (intersectionCircle2Circle.IntersectionType != Intersection.Type.IT_OTHER)
            {
                Vector2[] array = new Vector2[]
                {
                    intersectionCircle2Circle.Point0,
                    intersectionCircle2Circle.Point1
                };
                for (int i = 0; i < intersectionCircle2Circle.Quantity; i++)
                {
                    if (IntersectionArc2Arc2.Contains(this.arc0, array[i]) && IntersectionArc2Arc2.Contains(this.arc1, array[i]))
                    {
                        int quantity = this.Quantity;
                        this.Quantity = quantity + 1;
                        if (quantity == 0)
                        {
                            this.Point0 = array[i];
                        }
                        else
                        {
                            this.Point1 = array[i];
                        }
                    }
                }
                this.IntersectionType = ((this.Quantity > 0) ? Intersection.Type.IT_POINT : Intersection.Type.IT_EMPTY);
                return(this.IntersectionType > Intersection.Type.IT_EMPTY);
            }
            if (IntersectionArc2Arc2.Contains(this.arc1, this.arc0.StartPoint))
            {
                if (IntersectionArc2Arc2.Contains(this.arc1, this.arc0.EndPoint))
                {
                    this.IntersectionType = Intersection.Type.IT_OTHER;
                    this.IntersectionArc  = this.arc0;
                }
                else if (!this.arc0.StartPoint.Equals(this.arc1.EndPoint))
                {
                    this.IntersectionType = Intersection.Type.IT_OTHER;
                    this.IntersectionArc  = new Arc2(this.arc0.Circle, this.arc0.StartAngle, this.arc1.StartAngle + this.arc1.DeltaAngle - this.arc0.StartAngle);
                }
                else
                {
                    this.IntersectionType = Intersection.Type.IT_POINT;
                    this.Quantity         = 1;
                    this.Point0           = this.arc0.StartPoint;
                }
                return(true);
            }
            if (IntersectionArc2Arc2.Contains(this.arc1, this.arc0.EndPoint))
            {
                if (!this.arc0.EndPoint.Equals(this.arc1.StartPoint))
                {
                    this.IntersectionType = Intersection.Type.IT_OTHER;
                    this.IntersectionArc  = new Arc2(this.arc0.Circle, this.arc1.StartAngle, this.arc0.StartAngle + this.arc0.DeltaAngle - this.arc1.StartAngle);
                }
                else
                {
                    this.IntersectionType = Intersection.Type.IT_POINT;
                    this.Quantity         = 1;
                    this.Point0           = this.arc1.StartPoint;
                }
                return(true);
            }
            if (IntersectionArc2Arc2.Contains(this.arc0, this.arc1.StartPoint))
            {
                this.IntersectionType = Intersection.Type.IT_OTHER;
                this.IntersectionArc  = this.arc1;
                return(true);
            }
            this.IntersectionType = Intersection.Type.IT_EMPTY;
            return(false);
        }