Skip to content

Increase quaternion tolerance for GLTF rotation

Michael Migliore requested to merge michael.migliore/vtk:gltf-cam into master

When reading a glTF file, rotations are defined using quaternion where the floating-point values can be declared in ASCII form.
It is imprecise, but usually fine because the rotation is applied once and the precision error is not accumulated.
Because of the imprecision, the quaternion is not perfectly normalized and when we are checking it, the current tolerance used is too low and produces too many false-positive warnings and useless normalization computation.
This MR changes the tolerance to 1e-4 which produces no false positive from the official glTF test database provided by Khronos.

Related to f3d/f3d#241 (closed)

Backport: release

Edited by Michael Migliore

Merge request reports

Loading