コード例 #1
0
ファイル: Geometry.cs プロジェクト: gubenkoved/nr-planes
        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);
        }
コード例 #2
0
ファイル: Geometry.cs プロジェクト: gubenkoved/nr-planes
        public virtual bool HitTest(Vector vector)
        {
            // simplest implementation by default

            return(BoundingRectangle.HitTest(vector));
        }