/// <summary> /// Adds a collidable to the manager. /// </summary> /// <param name="collidable"></param> public void AddCollidable(ICollidable collidable) { var c = new CollidableAABB(collidable); foreach (CollidablePoint p in c.Points) { AddPoint(p); } if (collidable is IComponent) { var baseComp = collidable as Component; _aabbs.Add(c, baseComp.Owner); } else { _aabbs.Add(c, null); } }
public CollidablePoint(CollidablePointIndex index, PointF coordinates, CollidableAABB parentAABB) { Index = index; Coordinates = coordinates; ParentAABB = parentAABB; }
public CollidablePoint(CollidablePointIndex index, PointF coordinates, CollidableAABB parentAABB) { Index = index; Coordinates = coordinates; ParentAABB = parentAABB; }
/// <summary> /// Adds a collidable to the manager. /// </summary> /// <param name="collidable"></param> public void AddCollidable(ICollidable collidable) { var c = new CollidableAABB(collidable); foreach (CollidablePoint p in c.Points) { AddPoint(p); } if (collidable is IComponent) { var baseComp = collidable as Component; _aabbs.Add(c, baseComp.Owner); } else _aabbs.Add(c, null); }