Skip to content

Commit 64e2860

Browse files
committed
Added viewpoint
1 parent bd5d587 commit 64e2860

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

apps/app_demo/source/scenes/AppDemoSceneErlebARBielCBB.cpp

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ void AppDemoSceneErlebARBielCBB::registerAssetsToLoad(SLAssetLoader& al)
4545
AppCommon::shaderPath + "PerPixTmBackground.frag");
4646

4747
// initialize sensor stuff before loading the geotiff
48-
AppCommon::devLoc.originLatLonAlt(47.14271, 7.24337, 488.2); // Ecke Giosa
49-
AppCommon::devLoc.defaultLatLonAlt(47.14260, 7.24310, 488.7 + 1.7); // auf Parkplatz
48+
AppCommon::devLoc.originLatLonAlt(47.13052, 7.24122, 433.1); // Nullpunkt CBB LV95: 2'585'022.31, 1'219'967.25, Alt: 433.1m
49+
AppCommon::devLoc.defaultLatLonAlt(47.13092, 7.24106, 437); // Baum
50+
5051
AppCommon::devLoc.locMaxDistanceM(1000.0f);
5152
AppCommon::devLoc.improveOrigin(false);
5253
AppCommon::devLoc.useOriginAltitude(true);
@@ -55,10 +56,16 @@ void AppDemoSceneErlebARBielCBB::registerAssetsToLoad(SLAssetLoader& al)
5556
AppCommon::devRot.zeroYawAtStart(false);
5657
AppCommon::devRot.offsetMode(ROM_oneFingerX);
5758

58-
// This loads the DEM file and overwrites the altitude of originLatLonAlt and defaultLatLonAlt
59-
al.addGeoTiffToLoad(AppCommon::devLoc,
60-
AppCommon::dataPath +
61-
"erleb-AR/models/biel/DEM_Biel-BFH_WGS84.tif");
59+
/* initialize sensor stuff before loading the geotiff
60+
AppCommon::devLoc.nameLocations().push_back(SLLocation("Baum",
61+
47,
62+
07,
63+
51.48,
64+
7,
65+
14,
66+
28.21,
67+
433.1));
68+
*/
6269
}
6370
//-----------------------------------------------------------------------------
6471
//! After parallel loading of the assets the scene gets assembled in here.
@@ -102,21 +109,15 @@ void AppDemoSceneErlebARBielCBB::assemble(SLAssetManager* am, SLSceneView* sv)
102109
AppCommon::devLoc.calculateSolarAngles(AppCommon::devLoc.originLatLonAlt(),
103110
std::time(nullptr));
104111

105-
//_cbb->setMeshMat(matVideoBkgd, true);
106-
107-
// Make terrain a video shine trough
108-
// _bfh->findChild<SLNode>("Terrain")->setMeshMat(matVideoBkgd, true);
109-
110-
/* Make buildings transparent
111-
SLNode* buildings = _bfh->findChild<SLNode>("Buildings");
112-
SLNode* roofs = _bfh->findChild<SLNode>("Roofs");
113-
auto updateTranspFnc = [](SLMaterial* m) {m->kt(0.5f);};
114-
buildings->updateMeshMat(updateTranspFnc, true);
115-
roofs->updateMeshMat(updateTranspFnc, true);
116-
117-
// Set ambient on all child nodes
118-
_bfh->updateMeshMat([](SLMaterial* m) { m->ambient(SLCol4f(.2f, .2f, .2f)); }, true);
119-
*/
112+
// Make city with hard edges and without shadow mapping
113+
SLNode* Umgebung = _cbb->findChild<SLNode>("Umgebung");
114+
Umgebung->setMeshMat(matVideoBkgd, true);
115+
Umgebung->setDrawBitsRec(SL_DB_WITHEDGES, true);
116+
Umgebung->castsShadows(false);
117+
118+
// Make underground floor transparent
119+
SLNode* Decke0 = _cbb->findChild<SLNode>("Decke0");
120+
Decke0->setMeshMat(matVideoBkgd, true);
120121

121122
// Add axis object a world origin
122123
SLNode* axis = new SLNode(new SLCoordAxis(am), "Axis Node");
@@ -147,6 +148,5 @@ void AppDemoSceneErlebARBielCBB::assemble(SLAssetManager* am, SLSceneView* sv)
147148

148149
sv->doWaitOnIdle(false); // for constant video feed
149150
sv->camera(cam1);
150-
sv->drawBits()->on(SL_DB_ONLYEDGES);
151151
}
152152
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)