MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / resetCamera

Method resetCamera

examples/Tutorial/Tutorial.cpp:588–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586 }
587
588 virtual void resetCamera()
589 {
590 float dist = 10.5;
591 float pitch = -32;
592 float yaw = 136;
593 float targetPos[3] = {0, 0, 0};
594 if (m_app->m_renderer && m_app->m_renderer->getActiveCamera())
595 {
596 m_app->m_renderer->getActiveCamera()->setCameraDistance(dist);
597 m_app->m_renderer->getActiveCamera()->setCameraPitch(pitch);
598 m_app->m_renderer->getActiveCamera()->setCameraYaw(yaw);
599 m_app->m_renderer->getActiveCamera()->setCameraTargetPosition(targetPos[0], targetPos[1], targetPos[2]);
600 }
601 }
602};
603
604void Tutorial::tutorial2Update(float deltaTime)

Callers

nothing calls this directly

Calls 5

setCameraPitchMethod · 0.80
setCameraYawMethod · 0.80
getActiveCameraMethod · 0.45
setCameraDistanceMethod · 0.45

Tested by

no test coverage detected