1. A concise explanation of the problem you’re experiencing.
What’s the different between interpolateHeight function and interpolateMeshHeight function in QuantizedMeshTerrainData,the two function get different results in my code.
the interpolateHeight function return 2496.909550352688
the interpolateMeshHeight function return undefined
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
var cartographic = Cesium.Cartographic.fromDegrees(104.931, 33.387);
var height=terrainData.interpolateHeight(terrainRectangle, cartographic.longitude, cartographic.latitude);
//terrainData level 3 ,x 12 ,y 2
//the source code from cesium
QuantizedMeshTerrainData.prototype.interpolateHeight = function(rectangle, longitude, latitude) {
var u = CesiumMath.clamp((longitude - rectangle.west) / rectangle.width, 0.0, 1.0);
u *= maxShort;
var v = CesiumMath.clamp((latitude - rectangle.south) / rectangle.height, 0.0, 1.0);
v *= maxShort;
if (!defined(this._mesh)) {
return interpolateHeight(this, u, v);
}
return interpolateMeshHeight(this, u, v);
};
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
4. The Cesium version you’re using, your operating system and browser.
Cesium 1.53