| 32 | } |
| 33 | |
| 34 | void OrthographicCamera::UpdateViewMatrix() { |
| 35 | const auto transform = Maths::translate(Maths::Matrix4(1.0f), m_position) * Maths::rotate(Maths::Matrix4(1.0f), m_angle, Maths::Vector3(0.f, 0.f, 1.f)); |
| 36 | |
| 37 | // we default use left-handed coordinate system |
| 38 | // inversing operation is to switch right-handed coordinate system |
| 39 | // m_view_matrix = (m_position.z > 0) ? Maths::inverse(transform) : transform; |
| 40 | |
| 41 | m_view_matrix = Maths::inverse(transform); |
| 42 | m_view_projection = m_projection * m_view_matrix; |
| 43 | } |
| 44 | } // namespace ZEngine::Rendering::Cameras |
nothing calls this directly
no outgoing calls
no test coverage detected