about LocationMapper::calculateCameraRay
Closed this issue · 1 comments
staraimm commented
I think the z should be "mCameraZ + m_focalLength".
166 x = (x * m_sensorWidth) - (m_sensorWidth * 0.5) + m_cameraX;
167 y = (y * m_sensorHeight) - (m_sensorHeight * 0.5) + m_cameraY;
168 real z = m_cameraZ - m_focalLength;
Can anybody explain that?
hairu commented
Take a look at the description of the coordinate system at the top of Main.h. The camera sits in positive Z and is looking down the -Z direction. The sensor plane is "focal length" closer to the origin than the focal point of the camera.