Documentation cleanup and capitalize first letter in "Disc" in renderable

This commit is contained in:
Emma Broman
2020-09-16 15:16:15 +02:00
parent 57e25050e1
commit 0d1e464a64
5 changed files with 23 additions and 22 deletions
+4 -3
View File
@@ -55,14 +55,15 @@ scripting::LuaLibrary ExoplanetsModule::luaLibrary() const {
&exoplanets::luascriptfunctions::addExoplanetSystem,
{},
"string",
"Adds the nodes to the scene graph of the exoplanet system."
"Add the exoplanet system specified by the input string, including "
"information about the host star and planets."
},
{
"removeExoplanetSystem",
&exoplanets::luascriptfunctions::removeExoplanetSystem,
{},
"string",
"Removes the nodes from the scene graph of the exoplanet system."
"Removes the nodes of the specified exoplanet system from the scene graph."
}
};
@@ -74,7 +75,7 @@ void ExoplanetsModule::internalInitialize(const ghoul::Dictionary&) {
auto fRenderable = FactoryManager::ref().factory<Renderable>();
ghoul_assert(fTask, "No task factory existed");
fTask->registerClass<ExoplanetsCsvToBinTask>("ExoplanetsCsvToBinTask");
fRenderable->registerClass<RenderableOrbitdisc>("RenderableOrbitdisc");
fRenderable->registerClass<RenderableOrbitDisc>("RenderableOrbitDisc");
}
std::vector<documentation::Documentation> ExoplanetsModule::documentations() const {
+1 -1
View File
@@ -434,7 +434,7 @@ int addExoplanetSystem(lua_State* L) {
"Parent = '" + starIdentifier + "',"
"Enabled = true,"
"Renderable = {"
"Type = 'RenderableOrbitdisc',"
"Type = 'RenderableOrbitDisc',"
"Texture = openspace.absPath('" + DiscTextureFile + "'),"
"Size = " + std::to_string(semiMajorAxisInMeter) + ","
"Eccentricity = " + std::to_string(planet.ECC) + ","
@@ -69,15 +69,15 @@ namespace {
namespace openspace {
documentation::Documentation RenderableOrbitdisc::Documentation() {
documentation::Documentation RenderableOrbitDisc::Documentation() {
using namespace documentation;
return {
"Renderable Orbitdisc",
"exoplanets_renderable_orbitdisc",
"Renderable Orbit Disc",
"exoplanets_renderable_orbit_disc",
{
{
"Type",
new StringEqualVerifier("RenderableOrbitdisc"),
new StringEqualVerifier("RenderableOrbitDisc"),
Optional::No
},
{
@@ -108,7 +108,7 @@ documentation::Documentation RenderableOrbitdisc::Documentation() {
};
}
RenderableOrbitdisc::RenderableOrbitdisc(const ghoul::Dictionary& dictionary)
RenderableOrbitDisc::RenderableOrbitDisc(const ghoul::Dictionary& dictionary)
: Renderable(dictionary)
, _texturePath(TextureInfo)
, _size(SizeInfo, 1.f, 0.f, 3.0e12f)
@@ -127,7 +127,7 @@ RenderableOrbitdisc::RenderableOrbitdisc(const ghoul::Dictionary& dictionary)
documentation::testSpecificationAndThrow(
Documentation(),
dictionary,
"RenderableOrbitdisc"
"RenderableOrbitDisc"
);
if (dictionary.hasKey(OffsetInfo.identifier)) {
@@ -158,11 +158,11 @@ RenderableOrbitdisc::RenderableOrbitdisc(const ghoul::Dictionary& dictionary)
addProperty(_opacity);
}
bool RenderableOrbitdisc::isReady() const {
bool RenderableOrbitDisc::isReady() const {
return _shader && _texture;
}
void RenderableOrbitdisc::initializeGL() {
void RenderableOrbitDisc::initializeGL() {
_shader = global::renderEngine.buildRenderProgram(
"OrbitdiscProgram",
absPath("${BASE}/modules/exoplanets/shaders/orbitdisc_vs.glsl"),
@@ -185,7 +185,7 @@ void RenderableOrbitdisc::initializeGL() {
loadTexture();
}
void RenderableOrbitdisc::deinitializeGL() {
void RenderableOrbitDisc::deinitializeGL() {
glDeleteVertexArrays(1, &_quad);
_quad = 0;
@@ -199,7 +199,7 @@ void RenderableOrbitdisc::deinitializeGL() {
_shader = nullptr;
}
void RenderableOrbitdisc::render(const RenderData& data, RendererTasks&) {
void RenderableOrbitDisc::render(const RenderData& data, RendererTasks&) {
_shader->activate();
glm::dmat4 modelTransform =
@@ -239,7 +239,7 @@ void RenderableOrbitdisc::render(const RenderData& data, RendererTasks&) {
global::renderEngine.openglStateCache().resetPolygonAndClippingState();
}
void RenderableOrbitdisc::update(const UpdateData& data) {
void RenderableOrbitDisc::update(const UpdateData& data) {
if (_shader->isDirty()) {
_shader->rebuildFromFile();
_uniformCache.modelViewProjection = _shader->uniformLocation(
@@ -263,14 +263,14 @@ void RenderableOrbitdisc::update(const UpdateData& data) {
}
}
void RenderableOrbitdisc::loadTexture() {
void RenderableOrbitDisc::loadTexture() {
if (_texturePath.value() != "") {
std::unique_ptr<ghoul::opengl::Texture> texture =
ghoul::io::TextureReader::ref().loadTexture(absPath(_texturePath));
if (texture) {
LDEBUGC(
"RenderableOrbitdisc",
"RenderableOrbitDisc",
fmt::format("Loaded texture from '{}'", absPath(_texturePath))
);
_texture = std::move(texture);
@@ -286,7 +286,7 @@ void RenderableOrbitdisc::loadTexture() {
}
}
void RenderableOrbitdisc::createPlane() {
void RenderableOrbitDisc::createPlane() {
const GLfloat size = _size.value() * (1.0 + _eccentricity.value());
struct VertexData {
@@ -42,9 +42,9 @@ namespace openspace {
namespace documentation { struct Documentation; }
class RenderableOrbitdisc : public Renderable {
class RenderableOrbitDisc : public Renderable {
public:
RenderableOrbitdisc(const ghoul::Dictionary& dictionary);
RenderableOrbitDisc(const ghoul::Dictionary& dictionary);
void initializeGL() override;
void deinitializeGL() override;
@@ -740,7 +740,7 @@ documentation::Documentation ExoplanetsCsvToBinTask::documentation() {
"Type",
new StringEqualVerifier("ExoplanetsCsvToBinTask"),
Optional::No,
"The type of this task"
""
},
{
KeyInputCsv,
@@ -752,7 +752,7 @@ documentation::Documentation ExoplanetsCsvToBinTask::documentation() {
KeyInputSpeck,
new StringAnnotationVerifier("A file path to a speck file"),
Optional::No,
"The speck file with star location"
"The speck file with star locations"
},
{
KeyOutputBin,