Widget rotation bug?
Posted: Mon Feb 18, 2019 15:01
I think I encountered a bug in widget rotation. If the rotation value is set to "x:A y:0 z:0" or "x:0 y:B z:0", either by setRotation() or by XML property, where A and B is non-zero positive values, the widget is rotated in strange manner. When point is rotated around any axis in 3D, the component of point vector corresponding to axis is not changed. For example, if (a,b1,c1) is rotated by an arbitrary angle around x-axis, then new coordinates will be (a,b2,c2). I found that CEGUI changes the axis-component of a point, making the widget looking skewed instead of rotated. The rotation angle of 90 degrees around x or y-axis should make the widget (effectively) invisible, but the closest angle to make the widget look like line (=invisible) is ~99.35.
The image is attached. However, rotation quaternion (and rotation matrix I calculated from it) looks good to me and there are no issues with rotation around z-axis.
I use OpenGL3 renderer and played with glMatrixMode(), gluPerspective() and their friends to make sure it is not a viewport problem to no avail. This behavior occurs in v0-8 branch (v0.8.7 release 6267 (ed25a866ade7), tip 6740 (bd98855c1589)) and v0 branch (tip 6719 (fdb23c8a311b)).
Am I doing something wrong? Is this bug or expected behavior?
Thanks.

The image is attached. However, rotation quaternion (and rotation matrix I calculated from it) looks good to me and there are no issues with rotation around z-axis.
I use OpenGL3 renderer and played with glMatrixMode(), gluPerspective() and their friends to make sure it is not a viewport problem to no avail. This behavior occurs in v0-8 branch (v0.8.7 release 6267 (ed25a866ade7), tip 6740 (bd98855c1589)) and v0 branch (tip 6719 (fdb23c8a311b)).
Am I doing something wrong? Is this bug or expected behavior?
Thanks.
