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

Method getCameraProjectionMatrix

examples/OpenGLWindow/SimpleCamera.cpp:257–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257void SimpleCamera::getCameraProjectionMatrix(float projectionMatrix[16]) const
258{
259 if (m_data->m_enableVR)
260 {
261 for (int i = 0; i < 16; i++)
262 {
263 projectionMatrix[i] = m_data->m_projectionMatrixVR[i];
264 }
265 }
266 else
267 {
268 b3CreateFrustum(-m_data->m_aspect * m_data->m_frustumZNear, m_data->m_aspect * m_data->m_frustumZNear, -m_data->m_frustumZNear, m_data->m_frustumZNear, m_data->m_frustumZNear, m_data->m_frustumZFar, projectionMatrix);
269 }
270}
271void SimpleCamera::setVRCameraOffsetTransform(const float offset[16])
272{
273 for (int i = 0; i < 16; i++)

Callers 12

drawText3DMethod · 0.45
drawText3DMethod · 0.45
updateCameraMethod · 0.45
renderSceneInternalMethod · 0.45
getCameraInfoMethod · 0.45
mainFunction · 0.45
getCameraInfoMethod · 0.45
renderMethod · 0.45
renderMethod · 0.45
renderMethod · 0.45
renderSceneMethod · 0.45

Calls 1

b3CreateFrustumFunction · 0.70

Tested by

no test coverage detected