Clean up code for planet radius and bounding sphere calculation (#289)

- Remove some power scaled coordaintes.
- Remove spice dependency from sphere geometry.
- Remove dead code.
This commit is contained in:
Emil Axelsson
2017-04-18 09:58:27 +02:00
committed by GitHub
parent 481ee7d821
commit 4b38b33e18
62 changed files with 178 additions and 342 deletions
@@ -177,7 +177,7 @@ RenderablePlanetProjection::RenderablePlanetProjection(const ghoul::Dictionary&
glm::vec2 radius = glm::vec2(1.0, 9.0);
dictionary.getValue(keyRadius, radius);
setBoundingSphere(pss(radius));
setBoundingSphere(radius[0] * std::pow(10, radius[1]));
addPropertySubOwner(_geometry.get());
addPropertySubOwner(_projectionComponent);
@@ -356,7 +356,7 @@ void RenderablePlanetProjection::attitudeParameters(double time) {
glm::vec3 cpos = position.vec3();
float distance = glm::length(cpos);
float radius = getBoundingSphere().lengthf();
float radius = boundingSphere();
_projectorMatrix = _projectionComponent.computeProjectorMatrix(
cpos,