MCPcopy Create free account
hub / github.com/JeanPhilippeKernel/RendererEngine / UpdateViewMatrix

Method UpdateViewMatrix

ZEngine/src/OrthographicCamera.cpp:34–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected