Improve doc and add example for sampleTerrain.