Commit 78392f78 authored by fegorsch's avatar fegorsch

Rename `near` to `zNear`

`near` is an illegal variable name on Windows (if `windef.h` is included),
because a macro with the same name is defined.

Someone else already put your rage into words, see
http://lolengine.net/blog/2011/3/4/fuck-you-microsoft-near-far-macros.
parent 1b588570
......@@ -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