Пример #1
0
            /// <summary>
            /// Adds objects, which bounding rectangles contains
            /// specified point, to the list.
            /// </summary>
            /// <param name="point">A point</param>
            /// <param name="objects">A list for adding objects</param>
            internal void QueryObjectsContainingPoint <T>(ICoordinate point, IList <T> objects)
                where T : IIndexable
            {
                if (BoundingBox.ContainsPoint(point))
                {
                    foreach (T obj in _objects)
                    {
                        if (obj.BoundingRectangle.ContainsPoint(point))
                        {
                            objects.Add(obj);
                        }
                    }

                    if (_child0 != null && _child1 != null)
                    {
                        _child0.QueryObjectsContainingPoint(point, objects);
                        _child1.QueryObjectsContainingPoint(point, objects);
                    }
                }
            }
Пример #2
0
 /// <summary>
 /// Adds objects, which bounding rectangles contains
 /// specified point, to the list.
 /// </summary>
 /// <param name="point">A point</param>
 /// <param name="objects">A list for adding objects</param>
 public void QueryObjectsContainingPoint <T>(ICoordinate point, IList <T> objects)
     where T : IIndexable
 {
     _root.QueryObjectsContainingPoint(point, objects);
 }