def getAddIndexedHeightGrid(heightGrid, minimumXY, step, top, vertexes):
 indexedHeightGrid = []
 for (rowIndex, row) in enumerate(heightGrid):
  indexedRow = []
  indexedHeightGrid.append(indexedRow)
  rowOffset = ((step.imag * float(rowIndex)) + minimumXY.imag)
  for (columnIndex, element) in enumerate(row):
   columnOffset = ((step.real * float(columnIndex)) + minimumXY.real)
   vector3index = Vector3Index(len(vertexes), columnOffset, rowOffset, (top * element))
   indexedRow.append(vector3index)
   vertexes.append(vector3index)
 return indexedHeightGrid

def getAddIndexedHeightGrid ( heightGrid , minimumXY , step , top , vertexes ) : indexedHeightGrid = [ ] for ( rowIndex , row ) in enumerate ( heightGrid ) : indexedRow = [ ] indexedHeightGrid . append ( indexedRow ) rowOffset = ( ( step . imag * float ( rowIndex ) ) + minimumXY . imag ) for ( columnIndex , element ) in enumerate ( row ) : columnOffset = ( ( step . real * float ( columnIndex ) ) + minimumXY . real ) vector3index = Vector3Index ( len ( vertexes ) , columnOffset , rowOffset , ( top * element ) ) indexedRow . append ( vector3index ) vertexes . append ( vector3index ) return indexedHeightGrid
get and add an indexed heightgrid .