Commit beef60ba authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #1642 from fegorsch:rename-near-to-znear

parents 1b588570 78392f78
......@@ -97,11 +97,11 @@ static void _setCameraIntrinsics(Camera* cam, InputArray _K, const Size& imsize)
Matx33f K = _K.getMat();
float near = cam->getNearClipDistance();
float top = near * K(1, 2) / K(1, 1);
float left = -near * K(0, 2) / K(0, 0);
float right = near * (imsize.width - K(0, 2)) / K(0, 0);
float bottom = -near * (imsize.height - K(1, 2)) / K(1, 1);
float zNear = cam->getNearClipDistance();
float top = zNear * K(1, 2) / K(1, 1);
float left = -zNear * K(0, 2) / K(0, 0);
float right = zNear * (imsize.width - K(0, 2)) / K(0, 0);
float bottom = -zNear * (imsize.height - K(1, 2)) / K(1, 1);
// use frustum extents instead of setFrustumOffset as the latter
// assumes centered FOV, which is not the case
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment