void drawTree <T>(QuadTree <T> qt) where T : IRegion { Vector2 p1 = new Vector2(qt.Span.XMax, qt.Span.YMin); Vector2 p2 = new Vector2(qt.Span.XMin, qt.Span.YMin); Vector2 p3 = new Vector2(qt.Span.XMin, qt.Span.YMax); Vector2 p4 = new Vector2(qt.Span.XMax, qt.Span.YMax); float t = 3f; GraphicsUtils.DrawLineTop(p1, p2, Color.GreenYellow, t); GraphicsUtils.DrawLineTop(p2, p3, Color.GreenYellow, t); GraphicsUtils.DrawLineTop(p3, p4, Color.GreenYellow, t); GraphicsUtils.DrawLineTop(p4, p1, Color.GreenYellow, t); if (qt.SubTrees != null) { foreach (var qtsub in qt.SubTrees) { drawTree <T>(qtsub); } } }