fix createVisualShape.py ray vertical/horizontal and retina scale, fixes Issue 2085

fix memory leak in removeBody, fixes issue 2086
This commit is contained in:
erwincoumans
2019-01-30 15:29:43 -08:00
parent 9392b05d53
commit 014c68388e
3 changed files with 15 additions and 9 deletions

View File

@@ -1043,12 +1043,12 @@ bool OpenGLGuiHelper::getCameraInfo(int* width, int* height, float viewMatrix[16
btScalar aspect = float(*width) / float(*height);
hori *= aspect;
//compute 'hor' and 'vert' vectors, useful to generate raytracer rays
hor[0] = hori[0];
hor[1] = hori[1];
hor[2] = hori[2];
vert[0] = vertical[0];
vert[1] = vertical[1];
vert[2] = vertical[2];
hor[0] = hori[0]* m_data->m_glApp->m_window->getRetinaScale();
hor[1] = hori[1]* m_data->m_glApp->m_window->getRetinaScale();
hor[2] = hori[2]* m_data->m_glApp->m_window->getRetinaScale();
vert[0] = vertical[0]* m_data->m_glApp->m_window->getRetinaScale();
vert[1] = vertical[1]* m_data->m_glApp->m_window->getRetinaScale();
vert[2] = vertical[2]* m_data->m_glApp->m_window->getRetinaScale();
*yaw = getRenderInterface()->getActiveCamera()->getCameraYaw();
*pitch = getRenderInterface()->getActiveCamera()->getCameraPitch();