mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-09 23:08:49 -05:00
Cleanup code with designated initializer lists
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user