/// <summary>
        /// Does this geometry intersect with the given one?
        /// </summary>
        /// <param name="otherGeometry">The other geometry.</param>
        public bool Intersects(PolygonGeometryResource otherGeometry)
        {
            this.EnsureNotNullOrDisposed("this");
            otherGeometry.EnsureNotNullOrDisposed(nameof(otherGeometry));

            D2D.GeometryRelation relation = m_d2dGeometry.Compare(otherGeometry.m_d2dGeometry);

            return
                ((relation != D2D.GeometryRelation.Unknown) &&
                 (relation != D2D.GeometryRelation.Disjoint));
        }
Ejemplo n.º 2
0
        public static GeometryRelation export(this D2.GeometryRelation relation)
        {
            switch (relation)
            {
            case D2.GeometryRelation.Disjoint:
                return(GeometryRelation.Disjoint);

            case D2.GeometryRelation.IsContained:
                return(GeometryRelation.IsContained);

            case D2.GeometryRelation.Contains:
                return(GeometryRelation.Contains);

            case D2.GeometryRelation.Overlap:
                return(GeometryRelation.Overlap);
            }

            return(GeometryRelation.Disjoint);
        }