Commit ccf308d4 authored by Sven Schneider's avatar Sven Schneider
Browse files

replaced OSM Bld Layer with Stoeackach 3dTile model and changed target bld...

replaced OSM Bld Layer with Stoeackach 3dTile model and changed target bld color to red, removed also the other layers
parent 7650aca2
Pipeline #3405 passed with stages
in 37 seconds
...@@ -59,51 +59,51 @@ $(function () { ...@@ -59,51 +59,51 @@ $(function () {
canvas.focus(); canvas.focus();
var scene = viewer.scene; var scene = viewer.scene;
var osmBuildings = viewer.scene.primitives.add( // var osmBuildings = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({ // new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(96188), // url: Cesium.IonResource.fromAssetId(96188),
}) // })
); // );
const buildingHeightOffset = 60; //53 const buildingHeightOffset = 55; //53
///////////////////// STOECKACH LOD 1 ///////////////////// STOECKACH LOD 1
// var stoeckach = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ var stoeckach = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
// url: 'buildingTiles/StoeckachLOD1/tileset.json', url: 'buildingTiles/StoeckachLOD1/tileset.json',
// show: true show: true
// })); }));
// stoeckach.readyPromise.then(function (stoeckach) { stoeckach.readyPromise.then(function (stoeckach) {
// var R = 0; // roll var R = 0; // roll
// var P = 0; // pitch var P = 0; // pitch
// var Yaw = 0; // yaw var Yaw = 0; // yaw
// var height = buildingHeightOffset; var height = buildingHeightOffset -1 ;
// var cartographic = Cesium.Cartographic.fromCartesian(stoeckach.boundingSphere.center); var cartographic = Cesium.Cartographic.fromCartesian(stoeckach.boundingSphere.center);
// var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
// var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height); var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
// var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
// //var rotMat = new Cesium.Matrix3(); //var rotMat = new Cesium.Matrix3();
// var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R)); var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R));
// stoeckach.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation); stoeckach.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation);
// return zoomAll(stoeckach); return zoomAll(stoeckach);
// }); });
// stoeckach.readyPromise.then(function(stoeckach){ stoeckach.readyPromise.then(function(stoeckach){
// stoeckach.style = new Cesium.Cesium3DTileStyle({ stoeckach.style = new Cesium.Cesium3DTileStyle({
// color: "color('white',0.5)", color: "color('white',1)",
// }) })
// }); });
...@@ -138,7 +138,7 @@ $(function () { ...@@ -138,7 +138,7 @@ $(function () {
target_tileset.readyPromise.then(function(target_tileset){ target_tileset.readyPromise.then(function(target_tileset){
target_tileset.style = new Cesium.Cesium3DTileStyle({ target_tileset.style = new Cesium.Cesium3DTileStyle({
color: "color('black',0.5)", color: "color('red',0.9)",
}) })
}); });
...@@ -147,157 +147,157 @@ $(function () { ...@@ -147,157 +147,157 @@ $(function () {
///////////////////////////// Layer one ////////////////////////// ///////////////////////////// Layer one //////////////////////////
var L1 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ // var L1 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'buildingTiles/circularTiles/L1_yellow/tileset.json', // url: 'buildingTiles/circularTiles/L1_yellow/tileset.json',
show: true, // show: true,
})); // }));
L1.readyPromise.then(function (L1) { // L1.readyPromise.then(function (L1) {
return zoomAll(L1); // return zoomAll(L1);
}); // });
L1.readyPromise.then(function (L1) { // L1.readyPromise.then(function (L1) {
var R = 0; // roll // var R = 0; // roll
var P = 0; // pitch // var P = 0; // pitch
var Yaw = 0; // yaw // var Yaw = 0; // yaw
var height = buildingHeightOffset; // var height = buildingHeightOffset;
var cartographic = Cesium.Cartographic.fromCartesian(L1.boundingSphere.center); // var cartographic = Cesium.Cartographic.fromCartesian(L1.boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); // var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height); // var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); // var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
//var rotMat = new Cesium.Matrix3(); // //var rotMat = new Cesium.Matrix3();
var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R)); // var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R));
L1.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation); // L1.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation);
return zoomAll(L1); // return zoomAll(L1);
}); // });
L1.readyPromise.then(function(L1){ // L1.readyPromise.then(function(L1){
L1.style = new Cesium.Cesium3DTileStyle({ // L1.style = new Cesium.Cesium3DTileStyle({
color: "color('yellow',1)", // color: "color('yellow',1)",
}) // })
}); // });
///////////////////////////// Layer 2 ////////////////////////// // ///////////////////////////// Layer 2 //////////////////////////
var L2 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ // var L2 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'buildingTiles/circularTiles/L2_red/tileset.json', // url: 'buildingTiles/circularTiles/L2_red/tileset.json',
show: true, // show: true,
})); // }));
L2.readyPromise.then(function (L2) { // L2.readyPromise.then(function (L2) {
return zoomAll(L2); // return zoomAll(L2);
}); // });
L2.readyPromise.then(function (L2) { // L2.readyPromise.then(function (L2) {
var R = 0; // roll // var R = 0; // roll
var P = 0; // pitch // var P = 0; // pitch
var Yaw = 0; // yaw // var Yaw = 0; // yaw
var height = buildingHeightOffset; // var height = buildingHeightOffset;
var cartographic = Cesium.Cartographic.fromCartesian(L2.boundingSphere.center); // var cartographic = Cesium.Cartographic.fromCartesian(L2.boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); // var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height); // var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); // var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
//var rotMat = new Cesium.Matrix3(); // //var rotMat = new Cesium.Matrix3();
var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R)); // var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R));
L2.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation); // L2.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation);
return zoomAll(L2); // return zoomAll(L2);
}); // });
L2.readyPromise.then(function(L2){ // L2.readyPromise.then(function(L2){
L2.style = new Cesium.Cesium3DTileStyle({ // L2.style = new Cesium.Cesium3DTileStyle({
color: "color('red',1)", // color: "color('red',1)",
}) // })
}); // });
///////////////////////////// Layer 3 ////////////////////////// // ///////////////////////////// Layer 3 //////////////////////////
var L3 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ // var L3 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'buildingTiles/circularTiles/L3_green/tileset.json', // url: 'buildingTiles/circularTiles/L3_green/tileset.json',
show: true, // show: true,
})); // }));
L3.readyPromise.then(function (L3) { // L3.readyPromise.then(function (L3) {
return zoomAll(L3); // return zoomAll(L3);
}); // });
L3.readyPromise.then(function (L3) { // L3.readyPromise.then(function (L3) {
var R = 0; // roll // var R = 0; // roll
var P = 0; // pitch // var P = 0; // pitch
var Yaw = 0; // yaw // var Yaw = 0; // yaw
var height = buildingHeightOffset; // var height = buildingHeightOffset;
var cartographic = Cesium.Cartographic.fromCartesian(L3.boundingSphere.center); // var cartographic = Cesium.Cartographic.fromCartesian(L3.boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); // var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height); // var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); // var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
//var rotMat = new Cesium.Matrix3(); // //var rotMat = new Cesium.Matrix3();
var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R)); // var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R));
L3.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation); // L3.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation);
return zoomAll(L3); // return zoomAll(L3);
}); // });
L3.readyPromise.then(function(L3){ // L3.readyPromise.then(function(L3){
L3.style = new Cesium.Cesium3DTileStyle({ // L3.style = new Cesium.Cesium3DTileStyle({
color: "color('green',1)", // color: "color('green',1)",
}) // })
}); // });
///////////////////////////// Layer 3 ////////////////////////// // ///////////////////////////// Layer 3 //////////////////////////
var L4 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ // var L4 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'buildingTiles/circularTiles/L4_brown/tileset.json', // url: 'buildingTiles/circularTiles/L4_brown/tileset.json',
show: true, // show: true,
})); // }));
L4.readyPromise.then(function (L4) { // L4.readyPromise.then(function (L4) {
return zoomAll(L4); // return zoomAll(L4);
}); // });
L4.readyPromise.then(function (L4) { // L4.readyPromise.then(function (L4) {
var R = 0; // roll // var R = 0; // roll
var P = 0; // pitch // var P = 0; // pitch
var Yaw = 0; // yaw // var Yaw = 0; // yaw
var height = buildingHeightOffset; // var height = buildingHeightOffset;
var cartographic = Cesium.Cartographic.fromCartesian(L4.boundingSphere.center); // var cartographic = Cesium.Cartographic.fromCartesian(L4.boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); // var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height); // var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); // var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
//var rotMat = new Cesium.Matrix3(); // //var rotMat = new Cesium.Matrix3();
var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R)); // var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R));
L4.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation); // L4.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation);
return zoomAll(L4); // return zoomAll(L4);
}); // });
L4.readyPromise.then(function(L4){ // L4.readyPromise.then(function(L4){
L4.style = new Cesium.Cesium3DTileStyle({ // L4.style = new Cesium.Cesium3DTileStyle({
color: "color('CORAL',1)", // color: "color('CORAL',1)",
}) // })
}); // });
var camera = viewer.camera; var camera = viewer.camera;
......
...@@ -59,51 +59,51 @@ $(function () { ...@@ -59,51 +59,51 @@ $(function () {
canvas.focus(); canvas.focus();
var scene = viewer.scene; var scene = viewer.scene;
var osmBuildings = viewer.scene.primitives.add( // var osmBuildings = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({ // new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(96188), // url: Cesium.IonResource.fromAssetId(96188),
}) // })
); // );
const buildingHeightOffset = 60; //53 const buildingHeightOffset = 55; //53
///////////////////// STOECKACH LOD 1 ///////////////////// STOECKACH LOD 1
// var stoeckach = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ var stoeckach = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
// url: 'buildingTiles/StoeckachLOD1/tileset.json', url: 'buildingTiles/StoeckachLOD1/tileset.json',
// show: true show: true
// })); }));
// stoeckach.readyPromise.then(function (stoeckach) { stoeckach.readyPromise.then(function (stoeckach) {
// var R = 0; // roll var R = 0; // roll
// var P = 0; // pitch var P = 0; // pitch
// var Yaw = 0; // yaw var Yaw = 0; // yaw
// var height = buildingHeightOffset; var height = buildingHeightOffset - 1;
// var cartographic = Cesium.Cartographic.fromCartesian(stoeckach.boundingSphere.center); var cartographic = Cesium.Cartographic.fromCartesian(stoeckach.boundingSphere.center);
// var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
// var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height); var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
// var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
// //var rotMat = new Cesium.Matrix3(); //var rotMat = new Cesium.Matrix3();
// var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R)); var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R));
// stoeckach.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation); stoeckach.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation);
// return zoomAll(stoeckach); return zoomAll(stoeckach);
// }); });
// stoeckach.readyPromise.then(function(stoeckach){ stoeckach.readyPromise.then(function(stoeckach){
// stoeckach.style = new Cesium.Cesium3DTileStyle({ stoeckach.style = new Cesium.Cesium3DTileStyle({
// color: "color('white',0.5)", color: "color('white',1)",
// }) })
// }); });
...@@ -138,166 +138,166 @@ $(function () { ...@@ -138,166 +138,166 @@ $(function () {
target_tileset.readyPromise.then(function(target_tileset){ target_tileset.readyPromise.then(function(target_tileset){
target_tileset.style = new Cesium.Cesium3DTileStyle({ target_tileset.style = new Cesium.Cesium3DTileStyle({
color: "color('black',0.5)", color: "color('red',0.9)",
}) })
}); });
///////////////////////////// Layer one ////////////////////////// // ///////////////////////////// Layer one //////////////////////////
var L1 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ // var L1 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'buildingTiles/circularTiles/L1_yellow/tileset.json', // url: 'buildingTiles/circularTiles/L1_yellow/tileset.json',
show: true, // show: true,
})); // }));
L1.readyPromise.then(function (L1) { // L1.readyPromise.then(function (L1) {
return zoomAll(L1); // return zoomAll(L1);
}); // });
L1.readyPromise.then(function (L1) { // L1.readyPromise.then(function (L1) {
var R = 0; // roll // var R = 0; // roll
var P = 0; // pitch // var P = 0; // pitch
var Yaw = 0; // yaw // var Yaw = 0; // yaw
var height = buildingHeightOffset; // var height = buildingHeightOffset;
var cartographic = Cesium.Cartographic.fromCartesian(L1.boundingSphere.center); // var cartographic = Cesium.Cartographic.fromCartesian(L1.boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); // var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height); // var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); // var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
//var rotMat = new Cesium.Matrix3(); // //var rotMat = new Cesium.Matrix3();
var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R)); // var rotation = new Cesium.Matrix3.fromHeadingPitchRoll(new Cesium.HeadingPitchRoll(Yaw, P, R));
L1.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation); // L1.modelMatrix = Cesium.Matrix4.fromRotationTranslation(rotation,translation);
return zoomAll(L1); // return zoomAll(L1);
}); // });
L1.readyPromise.then(function(L1){ // L1.readyPromise.then(function(L1){
L1.style = new Cesium.Cesium3DTileStyle({ // L1.style = new Cesium.Cesium3DTileStyle({
color: "color('yellow',1)", // color: "color('yellow',1)",
}) // })
}); // });
///////////////////////////// Layer 2 ////////////////////////// // ///////////////////////////// Layer 2 //////////////////////////
var L2 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ // var L2 = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'buildingTiles/circularTiles/L2_red/tileset.json', // url: 'buildingTiles/circularTiles/L2_red/tileset.json',
show: true, // show: true,
})); // }));
L2.readyPromise.then(function (L2) { // L2.readyPromise.then(function (L2) {
return zoomAll(L2); // return zoomAll(L2);
}); // });
L2.readyPromise.then(function (L2) { // L2.readyPromise.then(function (L2) {
var R = 0; // roll // var R = 0; // roll
var P = 0; // pitch // var P = 0; // pitch
var Yaw = 0; // yaw // var Yaw = 0; // yaw
var height = buildingHeightOffset; // var height = buildingHeightOffset;
var cartographic = Cesium.Cartographic.fromCartesian(L2.boundingSphere.center); // var cartographic = Cesium.Cartographic.fromCartesian(L2.boundingSphere.center);
var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0); // var surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height); // var offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, height);
var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3()); // var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());