public static bool __CompilerHint__Line__MeshTileCell() { var grid = new LineGrid <MeshTileCell[]>(1, 1); foreach (var point in grid) { grid[point] = new MeshTileCell[1]; } var shapeStorageInfo = new ShapeStorageInfo <LinePoint>(new IntRect(), p => true); var shapeInfo = new LineShapeInfo <MeshTileCell>(shapeStorageInfo); return(grid[grid.First()][0] == null || shapeInfo.Translate(LinePoint.Zero) != null); }
protected override void InitGrid() { switch (shape) { case Shape.Segment: Grid = LineGrid <TileCell> .Segment(size); break; case Shape.Custom: var shapeBuilder = GetComponent <CustomGridBuilder>(); Grid = shapeBuilder.MakeGrid <TileCell, LinePoint>(); break; default: throw new ArgumentOutOfRangeException(); } }
protected override void InitGrid() { switch (shape) { case Shape.List: Grid = LineGrid <TileCell> .Segment(pointList.Count); break; case Shape.Poisson: pointList = PoissonDisk.GeneratePoisson( poissonDiskProperties.range.ToRect(), poissonDiskProperties.minimumDistance, poissonDiskProperties.pointCount); Grid = LineGrid <TileCell> .Segment(pointList.Count); break; default: throw new ArgumentOutOfRangeException(); } }