fix:32348 Collada yfov to xfov conversion fo camera settings
This commit is contained in:
@@ -867,9 +867,11 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
|
||||
{
|
||||
double yfov = camera->getYFov().getValue();
|
||||
double aspect = camera->getAspectRatio().getValue();
|
||||
double xfov = aspect * yfov;
|
||||
// xfov is in degrees, cam->lens is in millimiters
|
||||
cam->lens = fov_to_focallength(DEG2RADF(xfov), cam->sensor_x);
|
||||
|
||||
// NOTE: Needs more testing (As we curretnly have no official test data for this)
|
||||
|
||||
double xfov = 2.0f * atanf(aspect * tanf(DEG2RADF(yfov) * 0.5f));
|
||||
cam->lens = fov_to_focallength(xfov, cam->sensor_x);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user