public Tile[] FundamentalCell() { Tile template = TemplateTile(); Tile.ShrinkTile(ref template, 0.9); // Generate a cell tiling. TilingConfig tilingConfig = new TilingConfig(Q, P); Tiling poly = new Tiling(); poly.Generate(tilingConfig); m_tiles = poly.Tiles.ToList(); //SetupTransformCircle( tile ); // Call this before transforming. //SetupNeighborCircle( tile ); // Generate our cell. List <Tile> cellTiles = new List <Tile>(); foreach (Tile t in poly.Tiles) { Tile temp = template.Clone(); temp.Transform(t.Isometry.Inverse()); cellTiles.Add(temp); } return(cellTiles.ToArray()); }
/// <summary> /// Will clone the tile, transform it and add it to our tiling. /// </summary> private bool TransformAndAdd(Tile tile) { // Will we want to include it? if (!tile.IncludeAfterMobius(this.TilingConfig.M)) { return(false); } Tile clone = tile.Clone(); clone.Transform(this.TilingConfig.M); m_tiles.Add(clone); this.TilePositions[clone.Boundary.Center] = clone; return(true); }
/// <summary> /// Will clone the tile, transform it and add it to our tiling. /// </summary> private bool TransformAndAdd( Tile tile ) { // Will we want to include it? if( !tile.IncludeAfterMobius( this.TilingConfig.M ) ) return false; Tile clone = tile.Clone(); clone.Transform( this.TilingConfig.M ); m_tiles.Add( clone ); this.TilePositions[clone.Boundary.Center] = clone; return true; }