discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

wallsInView function

({WorldWall host, List<WorldWall> walls})? wallsInView(
  1. ParametricView view,
  2. Handle host
)

The walls a regeneration sees around host (the view adapter, Ruling 08-8): host as a WorldWall, and every neighbour of it in view carrying WallParams, as 07's outline reads them. Null when host is not a live wall.

Implementation

({WorldWall host, List<WorldWall> walls})? wallsInView(
    ParametricView view, Handle host) {
  final p = view.paramsOf<WallParams>(host);
  if (p == null) return null;
  return (
    host: WorldWall(host, p, view.toWorld(host)),
    walls: [
      for (final n in view.neighbours(host))
        if (view.paramsOf<WallParams>(n) case final q?)
          WorldWall(n, q, view.toWorld(n)),
    ],
  );
}