mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 01:39:47 -05:00
Finished cleanup of SpiceManager
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user