From d4c06951da2af132b92ec970e469439baa5963b1 Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Wed, 7 Jul 2021 05:37:53 +0200 Subject: [PATCH] Update faulty docs and function name for getGeoPosition (#1662) (#1677) New name: getLocalPositionFromGeo --- modules/globebrowsing/globebrowsingmodule.cpp | 14 ++++++++------ modules/globebrowsing/globebrowsingmodule_lua.inl | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 89b7fe275b..b9253986b4 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -398,20 +398,22 @@ scripting::LuaLibrary GlobeBrowsingModule::luaLibrary() const { "the surface of the specified globe." }, { - "getGeoPosition", - &globebrowsing::luascriptfunctions::getGeoPosition, + "getLocalPositionFromGeo", + &globebrowsing::luascriptfunctions::getLocalPositionFromGeo, {}, "string, number, number, number", - "Returns the specified surface position on the globe identified by the first " - "argument, as three floating point values - latitude, longitude and altitude " - "(degrees and meters)." + "Returns a position in the local Cartesian coordinate system of the globe " + "identified by the first argument, that corresponds to the given geographic " + "coordinates: latitude, longitude and altitude (in degrees and meters). In " + "the local coordinate system, the position (0,0,0) corresponds to the " + "globe's center." }, { "getGeoPositionForCamera", &globebrowsing::luascriptfunctions::getGeoPositionForCamera, {}, "void", - "Get geographic coordinates of the camera poosition in latitude, " + "Get geographic coordinates of the camera position in latitude, " "longitude, and altitude (degrees and meters)." }, { diff --git a/modules/globebrowsing/globebrowsingmodule_lua.inl b/modules/globebrowsing/globebrowsingmodule_lua.inl index 4ed196188c..ec5d2d9374 100644 --- a/modules/globebrowsing/globebrowsingmodule_lua.inl +++ b/modules/globebrowsing/globebrowsingmodule_lua.inl @@ -287,8 +287,8 @@ int goToGeo(lua_State* L) { return 0; } -int getGeoPosition(lua_State* L) { - ghoul::lua::checkArgumentsAndThrow(L, 4, "lua::getGeoPosition"); +int getLocalPositionFromGeo(lua_State* L) { + ghoul::lua::checkArgumentsAndThrow(L, 4, "lua::getLocalPositionFromGeo"); const std::string& globeIdentifier = ghoul::lua::value(L, 1); const double latitude = ghoul::lua::value(L, 2);