From 04d10045563b643fed758fb2d6262ac6c28f7981 Mon Sep 17 00:00:00 2001 From: Sven Schneider <sven.schneider@hft-stuttgart.de> Date: Thu, 9 Jun 2022 09:34:04 +0200 Subject: [PATCH] uploaded smaller 10Mpts point cloud to cesium ion and assigned new assett Id in code for hftInnerhofRGB_PC variable. Removed blue pointcloud from HTML and JS code as it is ugly and takes time to load --- public/Testgebiete.html | 8 ++-- public/Testgebiete.js | 90 +++++++++++++++++++++-------------------- 2 files changed, 50 insertions(+), 48 deletions(-) diff --git a/public/Testgebiete.html b/public/Testgebiete.html index 5d499ea..1b51054 100644 --- a/public/Testgebiete.html +++ b/public/Testgebiete.html @@ -64,7 +64,7 @@ <button style="margin: 5px 0px 5px 0px;" type="button" class="btn btn-danger btnMod" onclick="gotoHFT()">HFT</button> <div class="backdrop mainbackdrop"> - <h6 style="color: rgb(8, 228, 118);"> Pointclouds </h6> + <h6 style="color: rgb(8, 228, 118);"> Point cloud data </h6> <table> <tbody> <tr> @@ -75,14 +75,14 @@ </label> </td> </tr> - <tr> + <!-- <tr> <td style=" padding-bottom: 10px;"><strong>Blue PointCloud</strong> </td> <td style=" padding-bottom: 10px; padding-left: 15px;"><label class="switch"> - <input type="checkbox" onclick="toggleLargePC()" checked> + <input type="checkbox" onclick="toggleLargePC()" unchecked> <span class="slider round"></span> </label> </td> - </tr> + </tr> --> </tbody> </table> </div> diff --git a/public/Testgebiete.js b/public/Testgebiete.js index bca40ec..f627290 100644 --- a/public/Testgebiete.js +++ b/public/Testgebiete.js @@ -161,6 +161,7 @@ var HFT_testbld = viewer.scene.primitives.add( var BHT_Tileset = viewer.scene.primitives.add( new Cesium.Cesium3DTileset({ url: "buildingTiles/BHT/tileset.json", + // url: "https://inspirer-pcs.pointcloudai.de/api/pointCloudData/DltFXCFL6cNTr6x/3dtiles/tileset.json", show: true, }) ); @@ -195,57 +196,58 @@ var BHT_Tileset = viewer.scene.primitives.add( //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// -// HFT PointCloud Tileset. +// HFT PointCloud Tileset. Von Eberhard Guelch, nur monochrome //////////////////////////////////////////////////////////////////////////////////// -const PCOFFSET = 0; - -var hftLargePC = viewer.scene.primitives.add( - new Cesium.Cesium3DTileset({ - url: Cesium.IonResource.fromAssetId(655879), - }) -); - -hftLargePC.readyPromise.then(function (hftLargePC) { - var height = PCOFFSET; - var cartographic = Cesium.Cartographic.fromCartesian( - hftLargePC.boundingSphere.center - ); - var surface = Cesium.Cartesian3.fromRadians( - cartographic.longitude, - cartographic.latitude, - 0.0 - ); - var offset = Cesium.Cartesian3.fromRadians( - cartographic.longitude, - cartographic.latitude, - height - ); - var translation = Cesium.Cartesian3.subtract( - offset, - surface, - new Cesium.Cartesian3() - ); - // now shift / translate the tileset by the translation vector defined above - hftLargePC.modelMatrix = Cesium.Matrix4.fromTranslation(translation); - - // return zoomAll(hftLargePC); // zoom or rather go to the translated tileset -}); - -hftLargePC.style = new Cesium.Cesium3DTileStyle({ - color: "color('blue',0.3)", - // color: "color('red')" , - pointSize: 3 -}); - - +// const PCOFFSET = 0; +// var hftLargePC = viewer.scene.primitives.add( +// new Cesium.Cesium3DTileset({ +// url: Cesium.IonResource.fromAssetId(655879), // +// show: false, +// }) +// ); -///////////////////////////// innenhof PC +// hftLargePC.readyPromise.then(function (hftLargePC) { +// var height = PCOFFSET; +// var cartographic = Cesium.Cartographic.fromCartesian( +// hftLargePC.boundingSphere.center +// ); +// var surface = Cesium.Cartesian3.fromRadians( +// cartographic.longitude, +// cartographic.latitude, +// 0.0 +// ); +// var offset = Cesium.Cartesian3.fromRadians( +// cartographic.longitude, +// cartographic.latitude, +// height +// ); +// var translation = Cesium.Cartesian3.subtract( +// offset, +// surface, +// new Cesium.Cartesian3() +// ); +// // now shift / translate the tileset by the translation vector defined above +// hftLargePC.modelMatrix = Cesium.Matrix4.fromTranslation(translation); + +// // return zoomAll(hftLargePC); // zoom or rather go to the translated tileset +// }); + +// hftLargePC.style = new Cesium.Cesium3DTileStyle({ +// color: "color('blue',0.3)", +// // color: "color('red')" , +// pointSize: 3 +// }); + + + + +///////////////////////////// HFT Bau 1-3 Innenhof und Bau 1-3 aus RGB Point cloud var hftInnehofRGB_PC = viewer.scene.primitives.add( new Cesium.Cesium3DTileset({ - url: Cesium.IonResource.fromAssetId(712217), //656854 small point cloud + url: Cesium.IonResource.fromAssetId(1109983), //656854 small point cloud only inner courtyard }) ); -- GitLab