|
@@ -22076,9 +22076,9 @@
|
|
var locationLonLat = prop.raw.wgs84.split(',').map(e => parseFloat(e));
|
|
var locationLonLat = prop.raw.wgs84.split(',').map(e => parseFloat(e));
|
|
var location = viewer.transform.lonlatToLocal.forward(locationLonLat);
|
|
var location = viewer.transform.lonlatToLocal.forward(locationLonLat);
|
|
MergeEditor.moveBoundCenterTo(model, new Vector3().fromArray(location));
|
|
MergeEditor.moveBoundCenterTo(model, new Vector3().fromArray(location));
|
|
- MergeEditor.setModelBtmHeight(model, 0); // 离地高度为0 (因为不想在地图下方所以高程不管了,都在地面上即可)
|
|
|
|
model.hasLonLat = true;
|
|
model.hasLonLat = true;
|
|
}
|
|
}
|
|
|
|
+ MergeEditor.setModelBtmHeight(model, 0); // 离地高度为0 (因为不想在地图下方所以高程不管了,都在地面上即可)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (prop.rotation && (prop.rotation.x != 0 || prop.rotation.y != 0 || prop.rotation.z != 0)) {
|
|
if (prop.rotation && (prop.rotation.x != 0 || prop.rotation.y != 0 || prop.rotation.z != 0)) {
|
|
@@ -22268,7 +22268,10 @@
|
|
//else if(prop.type == 'las' || prop.type == 'ply' || prop.type == 'laz' )
|
|
//else if(prop.type == 'las' || prop.type == 'ply' || prop.type == 'laz' )
|
|
prop.url instanceof Array && (prop.url = prop.url[0]); //deal bug
|
|
prop.url instanceof Array && (prop.url = prop.url[0]); //deal bug
|
|
Potree.loadPointCloudScene(prop.url, prop.type, prop.modelId, prop.title, pointcloud => {
|
|
Potree.loadPointCloudScene(prop.url, prop.type, prop.modelId, prop.title, pointcloud => {
|
|
- pointcloud.matrixAutoUpdate = true;
|
|
|
|
|
|
+ {
|
|
|
|
+ pointcloud.matrixAutoUpdate = true;
|
|
|
|
+ pointcloud.matrix.decompose(pointcloud.position, pointcloud.quaternion, pointcloud.scale); //将数据集的经纬度和旋转应用到rotation和position (注意position和translateUser并不一样)
|
|
|
|
+ }
|
|
pointcloud.initialPosition = pointcloud.position.clone();
|
|
pointcloud.initialPosition = pointcloud.position.clone();
|
|
pointcloud.pos1MatrixInvert = new Matrix4().setPosition(pointcloud.initialPosition).invert();
|
|
pointcloud.pos1MatrixInvert = new Matrix4().setPosition(pointcloud.initialPosition).invert();
|
|
if (Potree.settings.mergeType2 && pointcloud.datasetData) {
|
|
if (Potree.settings.mergeType2 && pointcloud.datasetData) {
|