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

Method resetCamera

examples/ExampleBrowser/OpenGLGuiHelper.cpp:1180–1189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1178}
1179
1180void OpenGLGuiHelper::resetCamera(float camDist, float yaw, float pitch, float camPosX, float camPosY, float camPosZ)
1181{
1182 if (getRenderInterface() && getRenderInterface()->getActiveCamera())
1183 {
1184 getRenderInterface()->getActiveCamera()->setCameraDistance(camDist);
1185 getRenderInterface()->getActiveCamera()->setCameraPitch(pitch);
1186 getRenderInterface()->getActiveCamera()->setCameraYaw(yaw);
1187 getRenderInterface()->getActiveCamera()->setCameraTargetPosition(camPosX, camPosY, camPosZ);
1188 }
1189}
1190
1191bool OpenGLGuiHelper::getCameraInfo(int* width, int* height, float viewMatrix[16], float projectionMatrix[16], float camUp[3], float camForward[3], float hor[3], float vert[3], float* yaw, float* pitch, float* camDist, float cameraTarget[3]) const
1192{

Callers 2

openFileDemoFunction · 0.45
selectDemoFunction · 0.45

Calls 5

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

Tested by

no test coverage detected