|
@@ -60319,10 +60319,14 @@ void main() {
|
|
|
setPosition (index, position) {//拖拽后设置位置
|
|
|
let point = this.points[index];
|
|
|
point.copy(position);
|
|
|
- if(this.datasetId){
|
|
|
- this.dataset_points[index] = Potree.Utils.datasetPosTransform({toDataset:true, datasetId:this.datasetId, position:point.clone()});
|
|
|
+ /* if(this.datasetId){
|
|
|
+ this.dataset_points[index] = Potree.Utils.datasetPosTransform({toDataset:true, datasetId:this.datasetId, position:point.clone()})
|
|
|
+ } */
|
|
|
+
|
|
|
+ /* if(Potree.settings.editType == 'merge'){
|
|
|
+ this.dataset_points[index] = Potree.Utils.datasetPosTransform({toDataset:true,this.points_datasets[i], position:point.clone()})
|
|
|
+ } */
|
|
|
|
|
|
- }
|
|
|
let marker = this.markers[index];
|
|
|
this.updateMarker(marker, point);
|
|
|
|
|
@@ -60685,9 +60689,16 @@ void main() {
|
|
|
if(this.datasetId == void 0){
|
|
|
this.dataset_points = null; //可能为空或[null,null...]
|
|
|
}else {
|
|
|
- this.dataset_points = this.points.map(e=>{
|
|
|
- return Potree.Utils.datasetPosTransform({toDataset:true,datasetId:this.datasetId, position:e.clone()})
|
|
|
- });
|
|
|
+ if(Potree.settings.editType == 'merge'){//无地图
|
|
|
+ this.dataset_points = this.points.map((e,i)=>{
|
|
|
+ return Potree.Utils.datasetPosTransform({toDataset:true, datasetId:this.points_datasets[i], position:e.clone()})
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ this.dataset_points = this.points.map(e=>{
|
|
|
+ return Potree.Utils.datasetPosTransform({toDataset:true,datasetId:this.datasetId, position:e.clone()})
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
//}
|
|
|
}
|
|
@@ -60696,9 +60707,9 @@ void main() {
|
|
|
|
|
|
|
|
|
|
|
|
- transformByPointcloud(){//每次移动点云 or 加载测量线时要获取一下当前position
|
|
|
+ transformByPointcloud(){//每次移动点云 or 加载测量线时要获取一下当前position //有地图时
|
|
|
if(this.datasetId == void 0)return
|
|
|
- this.points = this.dataset_points.map(e=>{
|
|
|
+ this.points = this.dataset_points.map(e=>{
|
|
|
return Potree.Utils.datasetPosTransform({fromDataset:true, datasetId:this.datasetId, position:e.clone()})
|
|
|
});
|
|
|
|
|
@@ -63714,7 +63725,7 @@ void main() {
|
|
|
pointcloud.changePointOpacity(1);
|
|
|
material.shape = Potree.PointShape.SQUARE;
|
|
|
pointcloud.color = pointcloud.material.color = originDataset.color;
|
|
|
- //pointcloud.dataset_id = originDataset.id;//供漫游点找到属于的dataset点云
|
|
|
+ pointcloud.dataset_id = originDataset.id;//供漫游点找到属于的dataset点云
|
|
|
pointcloud.timeStamp = timeStamp;
|
|
|
//transformPointcloud(pointcloud, originDataset)
|
|
|
scene.addPointCloud(pointcloud);
|
|
@@ -117719,8 +117730,8 @@ ENDSEC
|
|
|
viewer.scene.measurements.forEach(measure=>{
|
|
|
measure.points_datasets.forEach((dataset_id,i)=>{
|
|
|
if(dataset_id == model.dataset_id){
|
|
|
- measure.point[i] = Potree.Utils.datasetPosTransform({fromDataset:true,datasetId:dataset_id, position:measure.dataset_points[i].clone()});
|
|
|
- measure.updateMarker(measure.markers[index], measure.point[i]);
|
|
|
+ measure.points[i] = Potree.Utils.datasetPosTransform({fromDataset:true,datasetId:dataset_id, position:measure.dataset_points[i].clone()});
|
|
|
+ measure.updateMarker(measure.markers[i], measure.points[i]);
|
|
|
measure.update();
|
|
|
}
|
|
|
});
|