How to get Euler angles?

Tagged: ,

This topic contains 3 replies, has 3 voices, and was last updated by  Joe Davis 4 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31121

    Dan
    Member

    I want to implement an interface that permits the rotation of an object with constrained angles.

    For example I want to turn a 3D object around its x-axis, but I want to constrain the possible movements from 0 – 90 degrees.
    Think of the object as a building, the user should not be able to ‘dive’ beneath the surface and see the the building from beneath.

    I would implement like this:
    1. transform my node’s rotation quaternion (or -matrix) to Euler-angles
    2. check angles agains my constraints, adapt them if necessary
    3. transform the Euler angles to a matrix which I hand over to OpenGL

    The task seems pretty common, so I guess there must be tools to perform that kind of calculation in PVRTools.
    I was surprised, that I could not find any function of help in PVRTModelPOD, PVRTQuaternion or PVRTMatrix.

    I could of course add my own QuaternionToEuler function, but somehow that just doesn’t seem to fit with the design of the SDK – which generally encapsulates this kind of functionality.
    Also, the tools do not seem to provide an interface to the underlying quaternion.
    I can only access rotations through functions like ‘void CPVRTModelPOD::GetRotationMatrix’, it seems.

    Am I missing something in the tools?
    Or am I just all wrong with my implementation pattern, overseeing some other, probably much simpler, solution?

    #36588

    BobGardner
    Member

    Hi Dan,

    You definitely have a full and working install of the tools, the functionality isn’t there. We’re currently looking at revamping our tools so any feedback is great. I’ll note this down and bring it up at our next discussion on the tools.

    Bob.

    #36589

    Dan
    Member

    Thanks Bob,
    In my opinion this would be a very interesting feature that would fit well in your tool set.
    Do you already have a release date for the next version on the roadmap?
    I am looking very much forward to it.

    I guess this would be my wish list =)
    – quaternion to Euler
    – matrix to Euler
    – matrix to lookAt vectors

    For those who are interested in the topic, I recommend:
    http://stackoverflow.com/questions/11646863/quaternions-how-to-limit-axis

    http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToEuler/index.htm

    #36590

    Joe Davis
    Member

    Hi Dan,

    Our 3.1 SDK release is due for the start of March. We’ve already locked down on features in this release though, so the changes are unlikely to be added. Our 3.2 SDK should be released ~August.

    Sorry that the features won’t be added sooner. As Bob has mentioned, your feedback has been noted for addition in our PVRTools overhaul.

    Regards,
    Joe

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.