Showing the changes to interface/src/Application.cpp (1 of 10 files). Show all
Unified · Split
| @@ -653,6 +653,9 @@ void Application::updateProjectionMatrix(Camera& camera, bool updateViewFrustum) · 652 unmodified lines | ||
| 653 | 653 | } |
| 654 | 654 | glFrustum(left, right, bottom, top, nearVal, farVal); |
| 655 | 655 | |
| 656 | + // save matrix | |
| 657 | + glGetFloatv(GL_PROJECTION_MATRIX, (GLfloat*)&_projectionMatrix); | |
| 658 | + | |
| 656 | 659 | glMatrixMode(GL_MODELVIEW); |
| 657 | 660 | } |
| 658 | 661 | |
| @@ -2961,6 +2964,15 @@ void Application::loadTranslatedViewMatrix(const glm::vec3& translation) { · 2302 unmodified lines | ||
| 2961 | 2964 | translation.z + _viewMatrixTranslation.z); |
| 2962 | 2965 | } |
| 2963 | 2966 | |
| 2967 | +void Application::getModelViewMatrix(glm::dmat4* modelViewMatrix) { | |
| 2968 | + (*modelViewMatrix) =_untranslatedViewMatrix; | |
| 2969 | + (*modelViewMatrix)[3] = _untranslatedViewMatrix * glm::vec4(_viewMatrixTranslation, 1); | |
| 2970 | +} | |
| 2971 | + | |
| 2972 | +void Application::getProjectionMatrix(glm::dmat4* projectionMatrix) { | |
| 2973 | + *projectionMatrix = _projectionMatrix; | |
| 2974 | +} | |
| 2975 | + | |
| 2964 | 2976 | void Application::computeOffAxisFrustum(float& left, float& right, float& bottom, float& top, float& nearVal, |
| 2965 | 2977 | float& farVal, glm::vec4& nearClipPlane, glm::vec4& farClipPlane) const { |
| 2966 | 2978 | |