Changeset View
Changeset View
Standalone View
Standalone View
source/blender/collada/AnimationImporter.cpp
| Context not available. | |||||
| float AnimationImporter::convert_to_focal_length(float in_xfov, int fov_type, float aspect, float sensorx) | float AnimationImporter::convert_to_focal_length(float in_xfov, int fov_type, float aspect, float sensorx) | ||||
| { | { | ||||
| // NOTE: Needs more testing (As we curretnly have no official test data for this) | // NOTE: Needs more testing (As we currently have no official test data for this) | ||||
| float xfov = (fov_type == CAMERA_YFOV) ? (2.0f * atanf(aspect * tanf(DEG2RADF(in_xfov) * 0.5f))) : DEG2RADF(in_xfov); | float xfov = (fov_type == CAMERA_YFOV) ? (2.0f * atanf(aspect * tanf(DEG2RADF(in_xfov) * 0.5f))) : DEG2RADF(in_xfov); | ||||
| return fov_to_focallength(xfov, sensorx); | return fov_to_focallength(xfov, sensorx); | ||||
| } | } | ||||
| Context not available. | |||||