Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: ASL Quaternion Functionality  (Read 2016 times)

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
ASL Quaternion Functionality
« on: March 05, 2014, 10:51:27 pm »

New quaternion functions:

    point3 QuaternionToRPY(quaternion);
    quaternion slerp(quaternion, quaternion, float);
    quaternion squad(quaternion, quaternion, quaternion, quaternion, float);

New quaternion operators:

    addition: Q + Q
    subtraction: Q - Q
    multiplication: Q * Q
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1448
    • View Profile
Re: ASL Quaternion Functionality
« Reply #1 on: March 06, 2014, 12:16:27 am »

I was able to test the first two!

quaternionToRPY - Works perfect. Translated the shapes' quaternion orientations directly into the RPY that was given in the status bar. Couldn't be happier. I should point out that it's a lowercase 'q' in the function name.

slerp - I plugged the slerp function into my PHUR script, seems to do a better job of slerping than my manual code, as far as I can tell :)
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: ASL Quaternion Functionality
« Reply #2 on: March 06, 2014, 05:41:21 am »

Darn, it should be a capital Q to be consistent with the others. I thought I'd tested that since I rearranged the code a bit but guess not. I'll have to fix it.

On another note, Raxx, you mentioned a need for the quaternion function lerp in an e-mail a while back. Was that a typo?  I don't have a good definition for it other that a straightforward linear interpretation of the 4 coordinates, which doesn't seem very meaningful. (It does for 2- and 2-dimensional vectors however.)
« Last Edit: March 06, 2014, 09:13:23 pm by Steve »
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1448
    • View Profile
Re: ASL Quaternion Functionality
« Reply #3 on: March 06, 2014, 02:58:11 pm »

Hm, I'm not entirely sure why I had lerp in there. I think it's safe to just ignore that :P
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: ASL Quaternion Functionality
« Reply #4 on: March 06, 2014, 09:13:35 pm »

OK, thanks.
Logged