Clone() 공개 메소드

public Clone ( ) : Tile
리턴 Tile
예제 #1
0
        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());
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
파일: Tiling.cs 프로젝트: roice3/Honeycombs
        /// <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;
        }