You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using HeightmapTerrainData to flattern out certain bumpy regions and using 1.22, the geometry that was positioned over the flattened region isn't properly positioned (altitude) anymore.
I'm wondering why upsample of HeightmapTerrainData changed to only upsample to integer values? Maybe I'm misunderstanding something...
var tilingScheme = new Cesium.GeographicTilingScheme();
var rect = new Cesium.Rectangle(0, 0, 0.1, 0.1);
var height = 1.8;
// a flat piece of terrain
var data = new Cesium.HeightmapTerrainData({
buffer : new Float32Array([height, height, height, height]),
width : 2,
height : 2
});
var mesh = data.createMesh(tilingScheme, 0, 0, 0, 1).then(function() {
return data.upsample(tilingScheme, 0, 0, 0, 0, 0, 1);
}).then(function(upsampled) {
// expecting the value of height but only getting the integer part
console.log(upsampled.interpolateHeight(rect, 0, 0));
});
The text was updated successfully, but these errors were encountered:
slozier
added a commit
to slozier/cesium
that referenced
this issue
Jun 9, 2016
Sorry to trash/bump a closed issue but I really would like to contact the original poster, slozier, about terrain mesh manipulation. Thanks. xtassin[at]gmail.com
I've been using
HeightmapTerrainData
to flattern out certain bumpy regions and using 1.22, the geometry that was positioned over the flattened region isn't properly positioned (altitude) anymore.I'm wondering why
upsample
ofHeightmapTerrainData
changed to only upsample to integer values? Maybe I'm misunderstanding something...I tracked it down to the following commit #3966
Here's some sample code:
The text was updated successfully, but these errors were encountered: