20 double ppcm = sqrt(
double(screen_resX * screen_resX) +
21 double(screen_resY * screen_resY)) /
23 double ppd = 0.0175 * user_distance * ppcm;
24 int nb_pixel = int(ppd / cpd);
33 double camera_distance,
36 double dpp = 2.f * camera_distance * std::tan(0.5 * camera_fov) /
37 double(camera_vportY);
38 double wDistance = dpp * double(nb_pixel);
51 double camera_distance,
58 cpd_to_pixel(screen_resX, screen_resY, screen_size, user_distance, cpd));
69 double ppcm = std::sqrt(
double(screen_resX * screen_resX) +
70 double(screen_resY * screen_resY)) /
72 double ppd = 0.0175 * user_distance * ppcm;
73 double cpd = ppd / double(nb_pixel);
82 double camera_distance,
85 double dpp = 2.f * camera_distance * std::tan(0.5 * camera_fov) /
86 double(camera_vportY);
87 int nb_pixel = int(wDistance / dpp);
99 double camera_distance,
108 camera_vportY, camera_fov, camera_distance, wDistance));