/***************************************************************************************** * * * OpenSpace * * * * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * * without restriction, including without limitation the rights to use, copy, modify, * * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * * permit persons to whom the Software is furnished to do so, subject to the following * * conditions: * * * * The above copyright notice and this permission notice shall be included in all copies * * or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include "exoplanetsmodule_lua.inl" namespace openspace { using namespace exoplanets; ExoplanetsModule::ExoplanetsModule() : OpenSpaceModule(Name) {} scripting::LuaLibrary ExoplanetsModule::luaLibrary() const { scripting::LuaLibrary res; res.name = "exoplanets"; res.functions = { { "addExoplanetSystem", &exoplanets::luascriptfunctions::addExoplanetSystem, {}, "string or list of strings", "Add one or multiple exoplanet systems to the scene, as specified by the " "input. An input string should be the name of the system host star." }, { "removeExoplanetSystem", &exoplanets::luascriptfunctions::removeExoplanetSystem, {}, "string", "Removes the nodes of the specified exoplanet system from the scene graph." }, { "listAvailableExoplanetSystems", &exoplanets::luascriptfunctions::listAvailableExoplanetSystems, {}, "", "Prints a list with the names of all exoplanet systems that can be added to " "the scene graph to the OpenSpace Log. " }, { "getListOfExoplanets", &exoplanets::luascriptfunctions::getListOfExoplanets, {}, "", "Gets a list with the names of all exoplanet systems, that can be used by a GUI." } }; return res; } void ExoplanetsModule::internalInitialize(const ghoul::Dictionary&) { auto fTask = FactoryManager::ref().factory(); auto fRenderable = FactoryManager::ref().factory(); ghoul_assert(fTask, "No task factory existed"); fTask->registerClass("ExoplanetsDataPreparationTask"); fRenderable->registerClass("RenderableOrbitDisc"); } std::vector ExoplanetsModule::documentations() const { return { ExoplanetsDataPreparationTask::documentation() }; } } // namespace openspace