mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
No longer do recursive lookups of Dictionarys when keys have dots in them (closes #2302)
This commit is contained in:
@@ -256,15 +256,6 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary&
|
||||
_meridianShift = p.meridianShift.value_or(_meridianShift);
|
||||
addProperty(_meridianShift);
|
||||
|
||||
// @TODO (abock, 2021-03-26) Poking into the Geometry dictionary is not really
|
||||
// optimal as we don't have local control over how the dictionary is checked. We
|
||||
// should instead ask the geometry whether it has a radius or not
|
||||
double radius = std::pow(10.0, 9.0);
|
||||
if (dict.hasValue<double>(KeyRadius)) {
|
||||
radius = dict.value<double>(KeyRadius);
|
||||
}
|
||||
setBoundingSphere(radius);
|
||||
|
||||
addPropertySubOwner(_projectionComponent);
|
||||
|
||||
_heightExaggeration.setExponent(3.f);
|
||||
@@ -291,6 +282,7 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary&
|
||||
else {
|
||||
_radius = std::get<glm::vec3>(p.radius);
|
||||
}
|
||||
setBoundingSphere(glm::compMax(_radius.value()));
|
||||
_radius.onChange([&]() { createSphere(); });
|
||||
addProperty(_radius);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user