Finished cleanup of SpiceManager

This commit is contained in:
Alexander Bock
2015-11-20 18:36:03 -05:00
parent 2c84368b0b
commit 443963a151
14 changed files with 312 additions and 310 deletions
@@ -148,7 +148,7 @@ void RenderableCrawlingLine::render(const RenderData& data) {
void RenderableCrawlingLine::update(const UpdateData& data) {
if (_program->isDirty())
_program->rebuildFromFile();
glm::dmat3 transformMatrix = SpiceManager::ref().getPositionTransformMatrix(_source, _referenceFrame, data.time);
glm::dmat3 transformMatrix = SpiceManager::ref().positionTransformMatrix(_source, _referenceFrame, data.time);
glm::mat4 tmp = glm::mat4(1);
for (int i = 0; i < 3; i++) {
@@ -159,13 +159,17 @@ void RenderableCrawlingLine::update(const UpdateData& data) {
_positions[SourcePosition] = PowerScaledCoordinate::CreatePowerScaledCoordinate(0, 0, 0);
std::string shape, instrument;
std::vector<glm::dvec3> bounds;
glm::dvec3 boresight;
bool found = openspace::SpiceManager::ref().getFieldOfView(_source, shape, instrument, boresight, bounds);
if (!found)
LERROR("Could not find field of view for instrument");
try {
SpiceManager::FieldOfViewResult res =
SpiceManager::ref().fieldOfView(_source);
boresight = res.boresightVector;
}
catch (const SpiceManager::SpiceKernelException& e) {
LERROR(e.what());
}
glm::vec4 target(boresight[0], boresight[1], boresight[2], 12);
target = tmp * target;