BecomeXYDummyOf() public method

public BecomeXYDummyOf ( Voxel, voxel, float offset ) : void
voxel Voxel,
offset float
return void
コード例 #1
0
        private void TriangulateGapRow()
        {
            dummyY.BecomeYDummyOf(yNeighbor.voxels[0], grid.gridSize);
            int cells  = grid.resolution - 1;
            int offset = cells * grid.resolution;

            for (int x = 0; x < cells; x++)
            {
                Voxel dummySwap = dummyT;
                dummySwap.BecomeYDummyOf(yNeighbor.voxels[x + 1], grid.gridSize);
                dummyT = dummyY;
                dummyY = dummySwap;
                TriangulateCell(grid.voxels[x + offset], grid.voxels[x + offset + 1], dummyT, dummyY);
            }

            if (xNeighbor != null)
            {
                dummyT.BecomeXYDummyOf(xyNeighbor.voxels[0], grid.gridSize);
                TriangulateCell(grid.voxels[grid.voxels.Length - 1], dummyX, dummyY, dummyT);
            }
        }