public void fillHeightMap(GL_Vector start, GL_Vector end) {
        float x0 = start.x * getScaleRatio() + transX;
        float y0 = start.y * getScaleRatio() + transY;
        float z0 = start.z * getScaleRatio() + transZ;
        float x1 = end.x * getScaleRatio() + transX;
        float y1 = end.y * getScaleRatio() + transY;
        float z1 = end.z * getScaleRatio() + transZ;

        float dx = x1 - x0;
        float dy = y1 - y0;
        float dz = z1 - z0;

        float step = 1 / Math.max(Math.abs(dx), Math.abs(dz));

        for (float t = 0; t <= 1; t += step) {
            int x = Math.round(dx * t + x0);
            int z = Math.round(dz * t + z0);
            float y = y0 + t * dy;

            addPointToMap(x, y, z);
        }

        float tempMinX = Math.min(x0, x1);
        float tempMinY = Math.min(y0, y1);
        float tempMinZ = Math.min(z0, z1);
        float tempMaxX = Math.max(x0, x1);
        float tempMaxY = Math.max(y0, y1);
        float tempMaxZ = Math.max(z0, z1);
        if (tempMinX < minX) minX = tempMinX;
        if (tempMinY < minY) minY = tempMinY;
        if (tempMinZ < minZ) minZ = tempMinZ;
        if (tempMaxX > maxX) maxX = tempMaxX;
        if (tempMaxY > maxY) maxY = tempMaxY;
        if (tempMaxZ > maxZ) maxZ = tempMaxZ;
    }