protected boolean getTriangles(float gridX, float gridY, TerrainPatch patch) {
        calcVec1.set(gridX, 0, gridY);
        int index = findClosestHeightIndex(calcVec1, patch);

        if (index == -1)
            return false;
        
        Triangle[] t = patch.getGridTriangles(gridX, gridY);
        if (t == null || t.length == 0)
            return false;
        
        gridTriA.set1(t[0].get1());
        gridTriA.set2(t[0].get2());
        gridTriA.set3(t[0].get3());

        gridTriB.set1(t[1].get1());
        gridTriB.set2(t[1].get2());
        gridTriB.set3(t[1].get3());

        return true;
    }
Request the triangles (in world coord space) of a TerrainBlock that
correspond to the given grid location. The triangles are stored in the
class fields _gridTriA and _gridTriB.

@param gridX
           grid row
@param gridY
           grid column
@param patch
           the TerrainPatch we are working with
@return true if the grid point is valid for the given block, false if it
        is off the block.
jme3-terrain/src/main/java/com/jme3/terrain/geomipmap/picking/BresenhamTerrainPicker.java