mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 12:10:52 -06:00
Make the aberration correction specification for targetPosition in SpiceManager explicit by including a seprate class for it
This commit is contained in:
@@ -183,8 +183,8 @@ void RenderableModel::render(const RenderData& data) {
|
||||
else
|
||||
_alpha = 1.0f;
|
||||
|
||||
glm::dvec3 p;
|
||||
SpiceManager::ref().getTargetPosition(_target, "SUN", "GALACTIC", "NONE", time, p, lt);
|
||||
glm::dvec3 p =
|
||||
SpiceManager::ref().targetPosition(_target, "SUN", "GALACTIC", SpiceManager::AberrationCorrection(), time, lt);
|
||||
psc tmppos = PowerScaledCoordinate::CreatePowerScaledCoordinate(p.x, p.y, p.z);
|
||||
glm::vec3 cam_dir = glm::normalize(data.camera.position().vec3() - tmppos.vec3());
|
||||
_programObject->setUniform("cam_dir", cam_dir);
|
||||
@@ -246,8 +246,8 @@ void RenderableModel::update(const UpdateData& data) {
|
||||
openspace::SpiceManager::ref().getPositionTransformMatrix(_source, _destination, _time, _stateMatrix);
|
||||
|
||||
double lt;
|
||||
glm::dvec3 p;
|
||||
openspace::SpiceManager::ref().getTargetPosition("SUN", _target, "GALACTIC", "NONE", _time, p, lt);
|
||||
glm::dvec3 p =
|
||||
openspace::SpiceManager::ref().targetPosition("SUN", _target, "GALACTIC", SpiceManager::AberrationCorrection(), _time, lt);
|
||||
_sunPosition = PowerScaledCoordinate::CreatePowerScaledCoordinate(p.x, p.y, p.z);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user