3DTiles倾斜模型使用代码的方式实现放大缩小怎么弄
up3dtilesMaxtrix() {
tileset.readyPromise.then(function(argument) {
let x = "298.29725",
y = "145.03273",
z = "0";
let RotateX = 0,
RotateY = 10,
RotateZ = -94;
//旋转
let mx = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(RotateX));
let my = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(RotateY));
let mz = Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(RotateZ));
let rotationX = Cesium.Matrix4.fromRotationTranslation(mx);
let rotationY = Cesium.Matrix4.fromRotationTranslation(my);
let rotationZ = Cesium.Matrix4.fromRotationTranslation(mz);
//平移
let position = Cesium.Cartesian3.fromDegrees(x, y, z);
let m = Cesium.Transforms.eastNorthUpToFixedFrame(position);
// 缩放
let scale = Cesium.Matrix4.fromUniformScale(3);
//旋转、平移、缩放矩阵相乘
Cesium.Matrix4.multiply(m, rotationX, m);
Cesium.Matrix4.multiply(m, rotationY, m);
Cesium.Matrix4.multiply(m, rotationZ, m);
Cesium.Matrix4.multiply(m, scale, m);
//赋值给tileset
tileset._root.transform = m;
viewer.zoomTo(tileset);
});
},
已解决