MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / UpdateViewMatrix

Method UpdateViewMatrix

SDK/src/NDK/Components/CameraComponent.cpp:316–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

GetPositionMethod · 0.45
GetRotationMethod · 0.45

Tested by

no test coverage detected