我正在尝试使用铯3d tileset。但是我没有找到放置磁贴的方法。
我尝试在tileet.json中转换和限制体积,但这没用。
{
"asset": {
"version": "1.0"
},
"properties": {
"Height": {
"minimum": 20,
"maximum": 20
}
},
"geometricError": 70,
"root": {
"refine": "ADD",
"transform": [
1.0001,0,0,
0,1,0,0,
0,0,1,0,
0,0,0,1
],
"boundingVolume": {
"region": [
-1.3197004795898053,
0.6988582109,
-1.3196595204101946,
0.6988897891,
0,
30
]
},
"geometricError": 0,
"content": {
"uri": "instancedOrientation.i3dm"
}
}
}
答案 0 :(得分:0)
我发现了如何在铯中放置磁贴。 只需在转换矩阵中更改翻译
tileset = cviewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url : url
}));
//Original location of tileset
let pos = {
x: 1214939.1184933728,
y: -4736505.884059093,
z: 4081598.457967,
};
tileset._root.transform[12] = cviewer.camera.position.x - pos.x;
tileset._root.transform[13] = cviewer.camera.position.y - pos.y;
tileset._root.transform[14] = cviewer.camera.position.z - pos.z;