Beispiel #1
0
 public List<T> GetLine(Point start, Point end)
 {
     var list = new List<T>();
     var linePoints = FBBresenhamHelper.Line(start.X / bucketDimension, start.Y / bucketDimension, end.X / bucketDimension, end.Y / bucketDimension);
     foreach(var point in linePoints)
     {
         list.AddRange(hash.GetAt(point.X, point.Y));
     }
     return list;
 }
Beispiel #2
0
 public List<T> GetCircle(Vector2 position, float radius)
 {
     var list = new List<T>();
     var circlePoints = FBBresenhamHelper.Circle((int)position.X / bucketDimension, (int)position.Y / bucketDimension, (int)radius / bucketDimension);
     foreach (var point in circlePoints)
     {
         list.AddRange(hash.GetAt(point.X, point.Y));
     }
     return list;
 }