mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 19:50:03 -06:00
Expanded the module to include luminosity and velocity data
This commit is contained in:
@@ -6,7 +6,7 @@ local RenderablePointsCloud = {
|
||||
Identifier = "RenderablePointsCloud",
|
||||
Renderable = {
|
||||
Type = "RenderablePointsCloud",
|
||||
Color = {1.0, 1.0, 0.5},
|
||||
Color = {0.0, 0.0, 0.0},
|
||||
Data = {{0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}, {0.0, 0.0, 0.0}},
|
||||
Luminosity = {0.0, 0.0, 0.0}
|
||||
Opacity = 0.0,
|
||||
|
||||
@@ -214,13 +214,49 @@ namespace openspace {
|
||||
float size = readFloatValue(message);
|
||||
std::string guiName = readGUI(message);
|
||||
|
||||
ghoul::Dictionary renderable = {
|
||||
{ "Type", "RenderablePointsCloud"s },
|
||||
{ "Color", static_cast<glm::dvec3>(color)},
|
||||
{ "Data", pointData },
|
||||
{ "Opacity", static_cast<double>(opacity) },
|
||||
{ "Size", static_cast<double>(size)}
|
||||
};
|
||||
bool hasLuminosityData = !luminosityData.empty();
|
||||
bool hasVelocityData = !velocityData.empty();
|
||||
|
||||
if (hasLuminosityData && hasVelocityData) {
|
||||
ghoul::Dictionary renderable = {
|
||||
{ "Type", "RenderablePointsCloud"s },
|
||||
{ "Color", static_cast<glm::dvec3>(color)},
|
||||
{ "Data", pointData },
|
||||
{ "Luminosity", luminosityData },
|
||||
{ "Opacity", static_cast<double>(opacity) },
|
||||
{ "Size", static_cast<double>(size)},
|
||||
{ "Velocity", velocityData }
|
||||
};
|
||||
}
|
||||
else if (hasLuminosityData && !hasVelocityData) {
|
||||
ghoul::Dictionary renderable = {
|
||||
{ "Type", "RenderablePointsCloud"s },
|
||||
{ "Color", static_cast<glm::dvec3>(color)},
|
||||
{ "Data", pointData },
|
||||
{ "Luminosity", luminosityData },
|
||||
{ "Opacity", static_cast<double>(opacity) },
|
||||
{ "Size", static_cast<double>(size)},
|
||||
};
|
||||
}
|
||||
else if (!hasLuminosityData && hasVelocityData) {
|
||||
ghoul::Dictionary renderable = {
|
||||
{ "Type", "RenderablePointsCloud"s },
|
||||
{ "Color", static_cast<glm::dvec3>(color)},
|
||||
{ "Data", pointData },
|
||||
{ "Opacity", static_cast<double>(opacity) },
|
||||
{ "Size", static_cast<double>(size)},
|
||||
{ "Velocity", velocityData }
|
||||
};
|
||||
}
|
||||
else {
|
||||
ghoul::Dictionary renderable = {
|
||||
{ "Type", "RenderablePointsCloud"s },
|
||||
{ "Color", static_cast<glm::dvec3>(color)},
|
||||
{ "Data", pointData },
|
||||
{ "Opacity", static_cast<double>(opacity) },
|
||||
{ "Size", static_cast<double>(size)},
|
||||
};
|
||||
}
|
||||
|
||||
ghoul::Dictionary gui = {
|
||||
{ "Name", guiName },
|
||||
|
||||
Reference in New Issue
Block a user