Cleanup code with designated initializer lists

This commit is contained in:
Alexander Bock
2023-01-22 23:01:32 +01:00
parent 3c6fc51ac2
commit d52c5dd0d9
69 changed files with 532 additions and 411 deletions

View File

@@ -392,7 +392,7 @@ glm::vec3 GlobeBrowsingModule::cartesianCoordinatesFromGeo(
using namespace globebrowsing;
const Geodetic3 pos = {
{ glm::radians(latitude), glm::radians(longitude) },
{ .lat = glm::radians(latitude), .lon = glm::radians(longitude) },
altitude
};
@@ -451,8 +451,8 @@ void GlobeBrowsingModule::goToChunk(const globebrowsing::RenderableGlobe& globe,
positionOnPatch.lat *= uv.y;
positionOnPatch.lon *= uv.x;
const Geodetic2 pointPosition = {
corner.lat + positionOnPatch.lat,
corner.lon + positionOnPatch.lon
.lat = corner.lat + positionOnPatch.lat,
.lon = corner.lon + positionOnPatch.lon
};
// Compute altitude
@@ -688,29 +688,28 @@ uint64_t GlobeBrowsingModule::wmsCacheSize() const {
}
scripting::LuaLibrary GlobeBrowsingModule::luaLibrary() const {
scripting::LuaLibrary res;
res.name = "globebrowsing";
res.functions = {
codegen::lua::AddLayer,
codegen::lua::DeleteLayer,
codegen::lua::GetLayers,
codegen::lua::MoveLayer,
codegen::lua::GoToChunk,
codegen::lua::GoToGeo,
// @TODO (2021-06-23, emmbr) Combine with the above function when the camera
// paths work really well close to surfaces
codegen::lua::FlyToGeo,
codegen::lua::GetLocalPositionFromGeo,
codegen::lua::GetGeoPositionForCamera,
codegen::lua::LoadWMSCapabilities,
codegen::lua::RemoveWMSServer,
codegen::lua::CapabilitiesWMS
return {
.name = "globebrowsing",
.functions = {
codegen::lua::AddLayer,
codegen::lua::DeleteLayer,
codegen::lua::GetLayers,
codegen::lua::MoveLayer,
codegen::lua::GoToChunk,
codegen::lua::GoToGeo,
// @TODO (2021-06-23, emmbr) Combine with the above function when the camera
// paths work really well close to surfaces
codegen::lua::FlyToGeo,
codegen::lua::GetLocalPositionFromGeo,
codegen::lua::GetGeoPositionForCamera,
codegen::lua::LoadWMSCapabilities,
codegen::lua::RemoveWMSServer,
codegen::lua::CapabilitiesWMS
},
.scripts = {
absPath("${MODULE_GLOBEBROWSING}/scripts/layer_support.lua")
}
};
res.scripts = {
absPath("${MODULE_GLOBEBROWSING}/scripts/layer_support.lua")
};
return res;
}
} // namespace openspace