Hello,
I'm rotating a window around z axis, so 2D rotation only, using Element::setRotation. I'm creating the quaternion like this:
w:1.0
x:0.0
y:0.0
z:desired angle
This rotates the window around it's center point, is it possible to rotate the window around an arbitrary pivot point (say for example the lower left corner)?
Widget rotation, pivot point
Moderators: CEGUI MVP, CEGUI Team
Re: Widget rotation, pivot point
@kiske1: No, but it's easy to implement. I implement it and will let u know when it's ready (prolly won't take long).
Re: Widget rotation, pivot point
Thank you very much!
Re: Widget rotation, pivot point
@kiske1:
NP
I've pushed an implementation to a branch "pivot". I've broken ABI so it's based on branch "v0" (which is API-compatible but not ABI-compatible with cegui releases 0.8.x or the cegui dev branch "v0-8"). Plz test it.
The pivot point is defined by a UVector3 (aka Vector3<UDim>), so u can use relative dimensions as well is arbitrary z values. The depth of a widget is considered to b 0, so it currently only makes sense to use an absolute dimension in z.
NP
I've pushed an implementation to a branch "pivot". I've broken ABI so it's based on branch "v0" (which is API-compatible but not ABI-compatible with cegui releases 0.8.x or the cegui dev branch "v0-8"). Plz test it.
The pivot point is defined by a UVector3 (aka Vector3<UDim>), so u can use relative dimensions as well is arbitrary z values. The depth of a widget is considered to b 0, so it currently only makes sense to use an absolute dimension in z.
Re: Widget rotation, pivot point
Hi @YaronCT, I haven't got the time to check this out, but I haven't forgotten it, and I'll test as soon as possible.
Re: Widget rotation, pivot point
@kiske1: Alright, do note though that the longer u wait, the more difficult it becomes for me to continue working on the issue coz I need to recall the details. And certainly while u don't test it it won't increase my motivation to start helping u on a new issue, that I now see you've asked, which also makes me wonder how it is u don't have time to check this out.
Re: Widget rotation, pivot point
Seems like you have no choice but to test is, kiske.
CrazyEddie: "I don't like GUIs"
Re: Widget rotation, pivot point
Hello!
I got commissioned to other projects, this is why I can only dedicate much less time that I'd like to this project which uses CEGUI. I feel really sorry if I seemed to be "ungrateful", it was not my intenction...
Today I got the time to test the pivot branch and it does exactly what I needed! Do you plan to include this in the 0-8 branch?
I got commissioned to other projects, this is why I can only dedicate much less time that I'd like to this project which uses CEGUI. I feel really sorry if I seemed to be "ungrateful", it was not my intenction...
Today I got the time to test the pivot branch and it does exactly what I needed! Do you plan to include this in the 0-8 branch?
Re: Widget rotation, pivot point
@kiske1: No, it breaks ABI therefore it's implemented in branch "v0", and that's where I'll merge it. That branch is API compatible with cegui 0.8.x so u should b able to use it without changing your code.
Re: Widget rotation, pivot point
@kiske1: I've merged it into branches "v0" and "default".
Who is online
Users browsing this forum: No registered users and 10 guests