Changed #define FBX_FOV_UNKNOWN to const float kFovUnknown

pull/5175/head
sfjohnston 2023-07-23 12:05:01 -07:00
parent 3ec8a36764
commit dd40b0ccee
2 changed files with 5 additions and 4 deletions

View File

@ -438,7 +438,7 @@ void FBXConverter::ConvertCamera(const Camera &cam, const std::string &orig_name
float fov_deg = cam.FieldOfView();
// If FOV not specified in file, compute using FilmWidth and FocalLength.
if (fov_deg == FBX_FOV_UNKNOWN) {
if (fov_deg == kFovUnknown) {
float film_width_inches = cam.FilmWidth();
float focal_length_mm = cam.FocalLength();
ASSIMP_LOG_VERBOSE_DEBUG("FBX FOV unspecified. Computing from FilmWidth (", film_width_inches, "inches) and FocalLength (", focal_length_mm, "mm).");

View File

@ -55,12 +55,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define _AI_CONCAT(a,b) a ## b
#define AI_CONCAT(a,b) _AI_CONCAT(a,b)
/* Use an 'illegal' default FOV value to detect if the FBX camera has set the FOV. */
#define FBX_FOV_UNKNOWN -1.0f
namespace Assimp {
namespace FBX {
// Use an 'illegal' default FOV value to detect if the FBX camera has set the FOV.
static const float kFovUnknown = -1.0f;
class Parser;
class Object;
@ -251,7 +252,7 @@ public:
fbx_simple_property(FilmAspectRatio, float, 1.0f)
fbx_simple_property(ApertureMode, int, 0)
fbx_simple_property(FieldOfView, float, FBX_FOV_UNKNOWN)
fbx_simple_property(FieldOfView, float, kFovUnknown)
fbx_simple_property(FocalLength, float, 1.0f)
};