public void TestListQueryEnum() { QuadTreeRectPointFInverse<QTreeObject> qtree = new QuadTreeRectPointFInverse<QTreeObject>(); qtree.AddRange(new List<QTreeObject> { new QTreeObject(new RectangleF(10,10,10,10)), new QTreeObject(new RectangleF(-1000,1000,10,10)) }); var list = qtree.EnumObjects(new PointF(11, 11)); Assert.AreEqual(1, list.Count()); }
public void TestListGetAll() { QuadTreeRectPointFInverse<QTreeObject> qtree = new QuadTreeRectPointFInverse<QTreeObject>(); qtree.AddRange(new List<QTreeObject> { new QTreeObject(new RectangleF(10,10,10,10)), new QTreeObject(new RectangleF(-1000,1000,10,10)) }); var list = qtree.GetAllObjects(); Assert.AreEqual(2, list.Count()); }
public void TestListQueryOutput() { var list = new List<QTreeObject>(); QuadTreeRectPointFInverse<QTreeObject> qtree = new QuadTreeRectPointFInverse<QTreeObject>(); qtree.AddRange(new List<QTreeObject> { new QTreeObject(new RectangleF(10,10,10,10)), new QTreeObject(new RectangleF(-1000,1000,10,10)) }); qtree.GetObjects(new PointF(11, 11), list); Assert.AreEqual(1, list.Count); }
public void TestListGetAll() { QuadTreeRectPointFInverse <QTreeObject> qtree = new QuadTreeRectPointFInverse <QTreeObject>(); qtree.AddRange(new List <QTreeObject> { new QTreeObject(new RectangleF(10, 10, 10, 10)), new QTreeObject(new RectangleF(-1000, 1000, 10, 10)) }); var list = qtree.GetAllObjects(); Assert.AreEqual(2, list.Count()); }
public void TestListQueryEnum() { QuadTreeRectPointFInverse <QTreeObject> qtree = new QuadTreeRectPointFInverse <QTreeObject>(); qtree.AddRange(new List <QTreeObject> { new QTreeObject(new RectangleF(10, 10, 10, 10)), new QTreeObject(new RectangleF(-1000, 1000, 10, 10)) }); var list = qtree.EnumObjects(new PointF(11, 11)); Assert.AreEqual(1, list.Count()); }
public void TestListQueryOutput() { var list = new List <QTreeObject>(); QuadTreeRectPointFInverse <QTreeObject> qtree = new QuadTreeRectPointFInverse <QTreeObject>(); qtree.AddRange(new List <QTreeObject> { new QTreeObject(new RectangleF(10, 10, 10, 10)), new QTreeObject(new RectangleF(-1000, 1000, 10, 10)) }); qtree.GetObjects(new PointF(11, 11), list); Assert.AreEqual(1, list.Count); }