Beispiel #1
0
        public bool IsIntersectsOrInclude(Geometry anotherGeomery)
        {
            if (IsIntersectsWith(anotherGeomery))
            {
                return(true);
            }

            if (BoundingRectangle.HitTest(anotherGeomery.Center) && HitTest(anotherGeomery.Center)) // another geomenty in this geometry case
            {
                return(true);
            }

            if (anotherGeomery.BoundingRectangle.HitTest(Center) && anotherGeomery.HitTest(Center)) // this geomenty in another geometry case
            {
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        public virtual bool HitTest(Vector vector)
        {
            // simplest implementation by default

            return(BoundingRectangle.HitTest(vector));
        }