Algorithms.RectHV.Contains C# (CSharp) Method

Contains() public method

public Contains ( Point2D p ) : bool
p Point2D
return bool
        public bool Contains(Point2D p) {
            return (p.X >= Xmin && p.X <= Xmax)
                   && (p.Y >= Ymin && p.Y <= Ymax);
        }

Usage Example

Esempio n. 1
0
 private void Range(KdNode node, RectHV nrect, RectHV rect, Queue<Point2D> queue) {
     if (node == null) {
         return;
     }
     if (rect.Intersects(nrect)) {
         var p = new Point2D(node.X, node.Y);
         if (rect.Contains(p)) {
             queue.Enqueue(p);
         }
         Range(node.Left, LeftRect(nrect, node), rect, queue);
         Range(node.Right, RightRect(nrect, node), rect, queue);
     }
 }
All Usage Examples Of Algorithms.RectHV::Contains