[ODE] Using ODE with DirectX

Tobias Thorsen tobias at chaseace.com
Wed Mar 19 01:41:05 2003


Heres the conversion i use from ode matrices to D3DXMATRIX, and it works
fine for me.

D3DXMATRIX t;
dReal* bMat;
bMat = (dReal*) dBodyGetRotation(bodyID);

t._11 =bMat[0];
t._12 = bMat[4];
t._13 = bMat[8];
t._14 = 0;
t._21 = bMat[1];
t._22 = bMat[5];
t._23 = bMat[9];
t._24 = 0;
t._31 = bMat[2];
t._32 = bMat[6];
t._33 = bMat[10];
t._34 = 0;



Tobias Thorsen


----- Original Message -----
From: "Nate W" <coding@natew.com>
To: <ode@q12.org>
Sent: Tuesday, March 18, 2003 10:48 PM
Subject: Re: [ODE] Using ODE with DirectX


> On Tue, 18 Mar 2003, [utf-8] Jesús P. Salas wrote:
>
> > I want to use ODE with DirectX, ( yes, from Microsoft ;-) ),
> >
> > When I try to use that matrix directly into DX, the movement
> > of the objects is wrong, ..
> >
> > anyon have deal with this problem out there??
>
> Have a look at Si Brown's FreeFall buggy demo.  There's a link to it from
> the 'community' page at the ODE web site.  He used ODE with DirectX,
> and he shared his code.  I'm pretty sure the answer to you question will
> be in there.
>
> --
>
> Nate Waddoups
> Redmond WA USA
> http://www.natew.com
>
>
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>