Update faulty docs and function name for getGeoPosition (#1662) (#1677)

New name: getLocalPositionFromGeo
This commit is contained in:
Emma Broman
2021-07-07 05:37:53 +02:00
committed by GitHub
parent 5370b9190e
commit d4c06951da
2 changed files with 10 additions and 8 deletions

View File

@@ -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)."
},
{

View File

@@ -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<std::string>(L, 1);
const double latitude = ghoul::lua::value<double>(L, 2);