| 314 | */ |
| 315 | |
| 316 | void CameraComponent::UpdateViewMatrix() const |
| 317 | { |
| 318 | NazaraAssert(m_entity && m_entity->HasComponent<NodeComponent>(), "CameraComponent requires NodeComponent"); |
| 319 | |
| 320 | NodeComponent& nodeComponent = m_entity->GetComponent<NodeComponent>(); |
| 321 | |
| 322 | // Build the view matrix using the NodeComponent position/rotation |
| 323 | m_viewMatrix.MakeViewMatrix(nodeComponent.GetPosition(Nz::CoordSys_Global), nodeComponent.GetRotation(Nz::CoordSys_Global)); |
| 324 | m_viewMatrixUpdated = true; |
| 325 | } |
| 326 | |
| 327 | /*! |
| 328 | * \brief Updates the view port of the camera |
nothing calls this directly
no test coverage detected