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()); }
private static void GetAssociatedTiling(EHoneycomb honeycomb, out Tiling tiling, out Tile baseTile) { int p, q; GetPQ(honeycomb, out p, out q); TilingConfig tilingConfig = new TilingConfig(p, q, maxTiles: m_params.MaxTiles); tiling = new Tiling(); tiling.Generate(tilingConfig); baseTile = Tiling.CreateBaseTile(tilingConfig); }
private static void GetAssociatedTiling( EHoneycomb honeycomb, out Tiling tiling, out Tile baseTile ) { int p, q; GetPQ( honeycomb, out p, out q ); TilingConfig tilingConfig = new TilingConfig( p, q, maxTiles: m_params.MaxTiles ); tiling = new Tiling(); tiling.Generate( tilingConfig ); baseTile = Tiling.CreateBaseTile( tilingConfig ); }