protected int findClosestHeightIndex(int x, int z) {

        if (x < 0 || x >= width - 1) {
            return -1;
        }
        if (z < 0 || z >= width - 1) {
            return -1;
        }

        return z * width + x;
    }
Get the triangle that the point is on.

@param x coordinate in local space to the geomap
@param z coordinate in local space to the geomap
@return triangle in local space to the geomap
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/LODGeomap.java