def computeChunkHeightMap(materials, blocks, HeightMap=None):
 lightAbsorption = materials.lightAbsorption[blocks]
 heights = extractHeights(lightAbsorption)
 heights = heights.swapaxes(0, 1)
 if (HeightMap is None):
  return heights.astype('uint8')
 else:
  HeightMap[:] = heights
  return HeightMap

def computeChunkHeightMap ( materials , blocks , HeightMap = None ) : lightAbsorption = materials . lightAbsorption [ blocks ] heights = extractHeights ( lightAbsorption ) heights = heights . swapaxes ( 0 , 1 ) if ( HeightMap is None ) : return heights . astype ( 'uint8' ) else : HeightMap [ : ] = heights return HeightMap
computes the heightmap array for a chunk .