mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-17 01:38:34 -06:00
Rename pathnav functions (goTo => flyTo)
This commit is contained in:
@@ -427,8 +427,8 @@ scripting::LuaLibrary PathNavigator::luaLibrary() {
|
||||
"Stops a path, if one is being played"
|
||||
},
|
||||
{
|
||||
"goTo",
|
||||
&luascriptfunctions::goTo,
|
||||
"flyTo",
|
||||
&luascriptfunctions::flyTo,
|
||||
"string [, bool, double]",
|
||||
"Move the camera to the node with the specified identifier. The optional "
|
||||
"double specifies the duration of the motion. If the optional bool is "
|
||||
@@ -436,8 +436,8 @@ scripting::LuaLibrary PathNavigator::luaLibrary() {
|
||||
"node. Either of the optional parameters can be left out."
|
||||
},
|
||||
{
|
||||
"goToHeight",
|
||||
&luascriptfunctions::goToHeight,
|
||||
"flyToHeight",
|
||||
&luascriptfunctions::flyToHeight,
|
||||
"string, double [, bool, double]",
|
||||
"Move the camera to the node with the specified identifier. The second "
|
||||
"argument is the desired target height above the target node's bounding "
|
||||
@@ -447,8 +447,8 @@ scripting::LuaLibrary PathNavigator::luaLibrary() {
|
||||
"parameters can be left out."
|
||||
},
|
||||
{
|
||||
"goToNavigationState",
|
||||
&luascriptfunctions::goToNavigationState,
|
||||
"flyToNavigationState",
|
||||
&luascriptfunctions::flyToNavigationState,
|
||||
"table, [double]",
|
||||
"Create a path to the navigation state described by the input table. "
|
||||
"The optional double specifies the target duration of the motion. Note "
|
||||
@@ -459,7 +459,7 @@ scripting::LuaLibrary PathNavigator::luaLibrary() {
|
||||
"createPath",
|
||||
&luascriptfunctions::createPath,
|
||||
"table",
|
||||
"Create the path as described by the lua table input argument"
|
||||
"Create a camera path as described by the lua table input argument"
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -68,8 +68,8 @@ int stopPath(lua_State* L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int goTo(lua_State* L) {
|
||||
ghoul::lua::checkArgumentsAndThrow(L, { 1, 3 }, "lua::goTo");
|
||||
int flyTo(lua_State* L) {
|
||||
ghoul::lua::checkArgumentsAndThrow(L, { 1, 3 }, "lua::flyTo");
|
||||
auto [nodeIdentifier, useUpFromTargetOrDuration, duration] = ghoul::lua::values<
|
||||
std::string, std::optional<std::variant<bool, double>>, std::optional<double>
|
||||
>(L);
|
||||
@@ -120,8 +120,8 @@ int goTo(lua_State* L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int goToHeight(lua_State* L) {
|
||||
ghoul::lua::checkArgumentsAndThrow(L, { 2, 4 }, "lua::goToHeight");
|
||||
int flyToHeight(lua_State* L) {
|
||||
ghoul::lua::checkArgumentsAndThrow(L, { 2, 4 }, "lua::flyToHeight");
|
||||
auto [nodeIdentifier, height, useUpFromTargetOrDuration, duration] =
|
||||
ghoul::lua::values<
|
||||
std::string, double, std::optional<std::variant<bool, double>>,
|
||||
@@ -169,8 +169,8 @@ int goToHeight(lua_State* L) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int goToNavigationState(lua_State* L) {
|
||||
ghoul::lua::checkArgumentsAndThrow(L, { 1, 2 }, "lua::goToNavigationState");
|
||||
int flyToNavigationState(lua_State* L) {
|
||||
ghoul::lua::checkArgumentsAndThrow(L, { 1, 2 }, "lua::flyToNavigationState");
|
||||
auto [navigationState, duration] =
|
||||
ghoul::lua::values<ghoul::Dictionary, std::optional<double>>(L);
|
||||
|
||||
@@ -182,7 +182,7 @@ int goToNavigationState(lua_State* L) {
|
||||
);
|
||||
}
|
||||
catch (documentation::SpecificationError& e) {
|
||||
LERRORC("goToNavigationState", ghoul::to_string(e.result));
|
||||
LERRORC("flyToNavigationState", ghoul::to_string(e.result));
|
||||
return ghoul::lua::luaError(
|
||||
L, fmt::format("Unable to create a path: {}", e.what())
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user