mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-22 21:09:27 -06:00
Make use of new verifiers (Color and File) (#1510)
* Use codegen for renderable discs * Utilize color and file verifier * Add missing property assignment in exoplanets module
This commit is contained in:
@@ -60,13 +60,13 @@ namespace {
|
||||
|
||||
struct [[codegen::Dictionary(RenderableCartesianAxes)]] Parameters {
|
||||
// [[codegen::verbatim(XColorInfo.description)]]
|
||||
std::optional<glm::vec3> xColor;
|
||||
std::optional<glm::vec3> xColor [[codegen::color()]];
|
||||
|
||||
// [[codegen::verbatim(YColorInfo.description)]]
|
||||
std::optional<glm::vec3> yColor;
|
||||
std::optional<glm::vec3> yColor [[codegen::color()]];
|
||||
|
||||
// [[codegen::verbatim(ZColorInfo.description)]]
|
||||
std::optional<glm::vec3> zColor;
|
||||
std::optional<glm::vec3> zColor [[codegen::color()]];
|
||||
|
||||
};
|
||||
#include "renderablecartesianaxes_codegen.cpp"
|
||||
@@ -83,24 +83,9 @@ documentation::Documentation RenderableCartesianAxes::Documentation() {
|
||||
RenderableCartesianAxes::RenderableCartesianAxes(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary)
|
||||
, _program(nullptr)
|
||||
, _xColor(
|
||||
XColorInfo,
|
||||
glm::vec3(1.f, 0.f, 0.f),
|
||||
glm::vec3(0.f),
|
||||
glm::vec3(1.f)
|
||||
)
|
||||
, _yColor(
|
||||
YColorInfo,
|
||||
glm::vec3(0.f, 1.f, 0.f),
|
||||
glm::vec3(0.f),
|
||||
glm::vec3(1.f)
|
||||
)
|
||||
, _zColor(
|
||||
ZColorInfo,
|
||||
glm::vec3(0.f, 0.f, 1.f),
|
||||
glm::vec3(0.f),
|
||||
glm::vec3(1.f)
|
||||
)
|
||||
, _xColor(XColorInfo, glm::vec3(1.f, 0.f, 0.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
, _yColor(YColorInfo, glm::vec3(0.f, 1.f, 0.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
, _zColor(ZColorInfo, glm::vec3(0.f, 0.f, 1.f), glm::vec3(0.f), glm::vec3(1.f))
|
||||
{
|
||||
const Parameters p = codegen::bake<Parameters>(dictionary);
|
||||
_xColor = p.xColor.value_or(_xColor);
|
||||
|
||||
Reference in New Issue
Block a user