[Development] QQuaternion issues with new 5.5 API

Konstantin Ritt ritt.ks at gmail.com
Fri Apr 24 17:10:49 CEST 2015


2015-04-24 16:33 GMT+04:00 Marc Mutz <marc.mutz at kdab.com>:

> Hi,
>
> While implementing qHash() overloads for gui/math3d classes, I found that
> QQuaternion gained several methods for 5.5 which I don't like:
>
> *EulerAngles():
>
> They are missing a QEulerAngles class. Instead, they deal with (float,
> float,
> float) and QVector3D. One function even returns three floats as out-
> parameters. I think my (partial) work on QDate/Time has shown just how much
> compilers don't like out parameters. The question here is how general such
> a
> QEulerAngles class should be...
>
> *AxisAndAngle()/*Axes():
>
> Same here, to a lesser extent. What bugs me most is the return-by-out-
> parameters, not so much that there's no QAxis3D class.
>
> There are several steps forward:
>
> - Create QEulerAngles as a float-only class
> - ditto, but as a template
> - ditto, but also add Q*Angle classes that have DEG/RAD hard-coded as
> template
>   arguments, with explicit conversions between, then use that in
> QEulerAngles.
>   [this likely won't happen for 5.5, though]
> - remove the methods in question for 5.5 and try again in 5.6
>
> Any opinions about which ones to take?
>

Sure I wanted to do it via introducing QAngle (which is also useful for
many other classes, even outside math3d), but that's definitely a 6.0
material; and then there is no much sense in introducing it just for
QQuaternion.

Konstantin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150424/f817b201/attachment.html>


More information about the Development mailing list