Filter3D: Refactored conversion to quaternion