Feature/codegen lua (#1906)

Adapting Lua functions to new codegen functionality
Improve the documentation itself
Add some styling to generated documentation
Have parameter names for Lua-defined Lua function documentation

Co-authored-by: Emma Broman <emma.broman@liu.se>
This commit is contained in:
Alexander Bock
2022-03-21 09:05:37 +01:00
committed by GitHub
parent 6f25dd31e5
commit 3844df20c9
69 changed files with 2656 additions and 4474 deletions

View File

@@ -26,9 +26,18 @@
#include <modules/debugging/rendering/renderabledebugplane.h>
#include <openspace/documentation/documentation.h>
#include <openspace/engine/globals.h>
#include <openspace/navigation/navigationhandler.h>
#include <openspace/navigation/path.h>
#include <openspace/navigation/pathnavigator.h>
#include <openspace/rendering/renderable.h>
#include <openspace/rendering/renderengine.h>
#include <openspace/scene/scene.h>
#include <openspace/scene/scenegraphnode.h>
#include <openspace/scripting/scriptengine.h>
#include <openspace/scripting/lualibrary.h>
#include <openspace/util/factorymanager.h>
#include <ghoul/logging/logmanager.h>
#include <ghoul/misc/assert.h>
#include <ghoul/misc/templatefactory.h>
@@ -53,51 +62,16 @@ std::vector<documentation::Documentation> DebuggingModule::documentations() cons
}
scripting::LuaLibrary DebuggingModule::luaLibrary() const {
scripting::LuaLibrary res;
res.name = "debugging";
res.functions = {
return {
"debugging",
{
"renderCameraPath",
&luascriptfunctions::renderCameraPath,
"[number, bool, number]",
"Render the current camera path from the path navigation system. The "
"first optional argument is the number of samples to take along the path "
"(defaults to 100). If a second optional argument is included and set to "
"true, a line indicating the camera view direction along the path will "
"also be rendered. This can be useful when debugging camera orientations. "
"Finally, the third optional argument can be used to set the length "
"(in meter) of the view direction lines"
},
{
"removeRenderedCameraPath",
&luascriptfunctions::removeRenderedCameraPath,
"",
"Removes the rendered camera path, if there is one"
},
{
"renderPathControlPoints",
&luascriptfunctions::renderPathControlPoints,
"[number]",
"Render the control points for the camera path spline as spheres. The "
"optional argument can be used to set the radius of the created spheres. "
},
{
"removePathControlPoints",
&luascriptfunctions::removePathControlPoints,
"",
"Removes the rendered control points"
},
{
"addCartesianAxes",
&luascriptfunctions::addCartesianAxes,
"string, [number]",
"Adds a set of Cartesian axes to the scene graph node identified by the "
"first string, to illustrate its local coordinate system. The second "
"(optional) argument is a scale value, in meters."
codegen::lua::RenderCameraPath,
codegen::lua::RemoveRenderedCameraPath,
codegen::lua::RenderPathControlPoints,
codegen::lua::RemovePathControlPoints,
codegen::lua::AddCartesianAxes
}
};
return res;
}
} // namespace openspace