SDK:: SetRotationFromQuaternion

Date : Wed, 6 Jun 2007 18:37:31 -0400
To : <XSI(at)Softimage.COM>
From : "Robert Moodie" <rmoodie(at)buzzimage.com>
Subject : SDK:: SetRotationFromQuaternion
I'm reading in a data file (.csv) and setting rotations from Quaternion data.
My problem is although the anim is working, the rotation values are wrong. I don't think that the SetRotationFromQuaternion method needs a Degrees2Radians conversion - is that right?
 
<--------------------------------------------------8<--------------------------------------------------------------->
var >   var >   var oTrans = XSIMath.CreateTransform();
   var oQuat = XSIMath.CreateQuaternion();
   
   for (x=1; x<=intEndFrame; x++)
    {
    s = ts.ReadLine();
    var a = s.split( "," );
    oQuat.Set(
     parseFloat( a[ 0 ] ),
     parseFloat( a[ 1 ] ),
     parseFloat( a[ 2 ] ),
     parseFloat( a[ 3 ] ) );
    
    oTrans.SetRotationFromQuaternion  ( oQuat );
    oNull.Kinematics.Local.Transform = oTrans;
 
    // Set keys, blah blah
<--------------------------------------------------8<--------------------------------------------------------------->
 
Cheers
_rob
 
 

ROBERT MOODIE
td :: pipeline/r&d

Groupe Image Buzz Inc.
312, rue Sherbrooke Est
Montréal (Québec)
Canada  H2X 1E6

 T  (514) 848-0579_1 800 567 0200
www.buzzimage.com

 

Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.