您好,您是想实现多段线柱体吗?通过entitty中polylineVolume是可以添加的。
function computeCircle(radius) {
var positions = [];
for (var i = 0; i < 360; i++) {
var radians = Cesium.Math.toRadians(i);
positions.push(new Cesium.Cartesian2(radius * Math.cos(radians), radius * Math.sin(radians)));
}
return positions;
}
var redTube = viewer.entities.add({
name : 'Red tube with rounded corners',
polylineVolume : {
positions : Cesium.Cartesian3.fromDegreesArrayHeights([
102.67773481610077, 31.071257883937033, 5000,
102.74883646240747, 31.121299541997338, 5000,
102.92726036147866, 31.08704848398098, 5000,
102.84562112186255, 31.010046039747248, 5000
]),
shape : computeCircle(100.0),
material: Cesium.Color.WHITE,
}
});