Possible to render in fisheye mode now that the combinedViewMatrix() function in the camera class actually returns the combined view matrix.

This commit is contained in:
Kalle Bladin
2016-05-27 12:13:40 -04:00
parent b3157137f5
commit bbc002514d
2 changed files with 5 additions and 1 deletions

View File

@@ -113,6 +113,8 @@ namespace openspace {
// @TODO this should simply be called viewMatrix!
// Or it needs to be changed so that it actually is combined. Right now it is
// only the view matrix that is the same for all SGCT cameras.
// Right now this function returns the actual combined matrix which makes some
// of the old calls to the function wrong..
const Mat4& combinedViewMatrix() const;
// Synchronization

View File

@@ -156,7 +156,9 @@ namespace openspace {
Mat4 cameraTranslation =
glm::inverse(glm::translate(Mat4(1.0), _position.shared));
_cachedCombinedViewMatrix.datum =
Mat4(viewRotationMatrix()) * cameraTranslation;
Mat4(sgctInternal.viewMatrix()) *
Mat4(viewRotationMatrix()) *
cameraTranslation;
}
return _cachedCombinedViewMatrix.datum;
}