jit.gen & quaternions

    Jul 07 2012 | 1:23 pm
    Hi there, is there a way to use easily quaternions with jit.gen ??
    I need to process a 3 planes matrix with x,y,z space coordinates with jit.gen (which is okay) but my calculation involves quaternions. Each row of coordinates have to be multiplied by quaternions & quaternions conjugates.
    anyone already did that with jit.gen ? if someone could help even outside of gen, I'd be happy :D

    • Jul 09 2012 | 7:47 pm
      hi julien. below is a patch that rotates vectors by a quaternion using jit.gen.
    • Jul 09 2012 | 8:12 pm
      Hi Robert, thanks a lot for your patch. I'll try it asap in my system. I'll grab the quat from jit.anim.node in order to not have problem with gimbal lock coming from euler angles, but I guess the jit.gen calculations remain the same.
      posting when I'll have tested it.
    • Jul 14 2012 | 4:42 pm
      I guess I'm VERY near from my solution.
      I'm rotating my vectors by the quaternion rotation. each vector is made by (objectVector - camVector)
      I included your codebox into mine and put the azimuth & elevation calculation in another codebox.
      I don't know if it is a problem of vector normalization or whatever, but it still doesn't work. if I move the camera "around" the object, by keeping the object in the center of my view, I should still have az=0 & el=0 ... this is basic and I absolutely don't understand why I don't have that :-(
    • Jul 19 2012 | 8:29 am
      Robert, can I request some help ? I'm still stuck. I don't understand where my logic fails
    • Jul 25 2012 | 11:18 am
      I tried to grab the rotation quaternion of my cam from jit.anim.node, gl.camera .. it doesnt work better This is a calculation error (in the part I made for sure) and I cannot debug it :-(
    • Aug 09 2012 | 8:50 am
      anyone else would help me ?