The open source OpenXR runtime

d/wmr: Turn commented-out code into if-guarded code.

authored by

Mateo de Mayo and committed by
Rylie Pavlik
5771ddd4 3f12e379

+5 -4
+5 -4
src/xrt/drivers/wmr/wmr_hmd.c
··· 1441 1441 float yp = y / z; 1442 1442 float rp2 = xp * xp + yp * yp; 1443 1443 float cdist = (1 + rp2 * (k1 + rp2 * (k2 + rp2 * k3))) / (1 + rp2 * (k4 + rp2 * (k5 + rp2 * k6))); 1444 - // If we were using OpenCV's camera model we would do 1445 - // float deltaX = 2 * p1 * xp * yp + p2 * (rp2 + 2 * xp * xp); 1446 - // float deltaY = 2 * p2 * xp * yp + p1 * (rp2 + 2 * yp * yp); 1447 - // But instead we use Azure Kinect model (see comment in wmr_hmd_create_stereo_camera_calib) 1444 + #if 0 // OpenCV model 1445 + float deltaX = 2 * p1 * xp * yp + p2 * (rp2 + 2 * xp * xp); 1446 + float deltaY = 2 * p2 * xp * yp + p1 * (rp2 + 2 * yp * yp); 1447 + #else // Azure Kinect model (see comment in wmr_hmd_create_stereo_camera_calib) 1448 1448 float deltaX = p1 * xp * yp + p2 * (rp2 + 2 * xp * xp); 1449 1449 float deltaY = p2 * xp * yp + p1 * (rp2 + 2 * yp * yp); 1450 + #endif 1450 1451 float xpp = xp * cdist + deltaX; 1451 1452 float ypp = yp * cdist + deltaY; 1452 1453 float u = fx * xpp + cx;