From d03acddb677c18b0bf5ad14a271c4fd6bad958e0 Mon Sep 17 00:00:00 2001 From: Tim Wundenberg Date: Tue, 17 Aug 2021 21:48:19 +0200 Subject: [PATCH] add rotation and transformation of PointClouds in map-view --- .../public/Potree/examples/pcw.html | 5 ++ PointCloudWeb.Web/src/components/ScanItem.vue | 60 ++++++++++++++++--- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/PointCloudWeb.Web/public/Potree/examples/pcw.html b/PointCloudWeb.Web/public/Potree/examples/pcw.html index 0e1bab0..fea6380 100644 --- a/PointCloudWeb.Web/public/Potree/examples/pcw.html +++ b/PointCloudWeb.Web/public/Potree/examples/pcw.html @@ -70,6 +70,9 @@ // material.size = 1; // material.pointSizeType = Potree.PointSizeType.ADAPTIVE; + pc.rotation.set(pointCloud.rotation.x, pointCloud.rotation.y, pointCloud.rotation.z); + pc.position.set(pointCloud.transformation.x, pointCloud.transformation.y, pointCloud.transformation.z); + loadedPointClouds.push({id: pointCloud.id, pointCloud: pc}) } @@ -84,6 +87,8 @@ entry.pointCloud.visible = !entry.pointCloud.visible; entry.pointCloud.visible = !entry.pointCloud.visible; } + entry.pointCloud.rotation.set(pointClouds[i].rotation.x, pointClouds[i].rotation.y, pointClouds[i].rotation.z); + entry.pointCloud.position.set(pointClouds[i].transformation.x, pointClouds[i].transformation.y, pointClouds[i].transformation.z); } else { loadByPc(pointClouds[i]) } diff --git a/PointCloudWeb.Web/src/components/ScanItem.vue b/PointCloudWeb.Web/src/components/ScanItem.vue index 250bfca..d605e4d 100644 --- a/PointCloudWeb.Web/src/components/ScanItem.vue +++ b/PointCloudWeb.Web/src/components/ScanItem.vue @@ -1,22 +1,33 @@