Unfortunately not, the data is ordered as W,X,Y,Z.
I'm writing a script to interrogate the resulting (Quat) transform data to hopefully pinpoint the discrepancy between the .csv and XSI transform... I'll let you know.
p.s SITransform, SIRotation etc. are immensely powerful, but goddamn the SDK docs are lame. (sorry).
_rob
-----Original Message-----
From: Brent McPherson [mailto:brentmc(at)Softimage.COM]
Sent: Wed 6/6/2007 6:57 PM
To: XSI(at)Softimage.COM
Subject: RE: : SetRotationFromQuaternion
Robert,
have you verified that the ordering of the quaternion components is the same?
Quaternions in XSI are defined as w,x,y,z but perhaps your .csv file is ordered x,y,z,w?
Just an idea...
--
Brent
________________________________
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Robert Moodie
Sent: Wednesday, June 06, 2007 11:38 PM
To: XSI(at)Softimage.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 oNull = Application.Selection(0)
var oNullTransform = oNull.Kinematics.Local.Transform
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
<<winmail.dat>>