Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Applying Newton rotation matrix

Author
Message
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 6th Jun 2006 21:01 Edited at: 7th Jun 2006 00:30
Does anybody knwo how to apply a rotation matrix to an object, like from newton??

I know about matrix math etc, but I just can't seem to find anything to get or set the rotation matrix of an object in DGSDK.

Thanks in advance

My W.I.P project
Kaiyodo
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: UK
Posted: 7th Jun 2006 00:54
You can get the internal D3DXMatrix of an object if you fancy digging about inside the DBO format header files, but setting it directly isn't very safe.

The best way I found to bring matrices back into DarkSDK was through the function below, it came with the source code to the FPSCreator ODE integration that TGC released a while back.



It takes in a D3D format (row major) matrix and writes the resulting xyz degree values into the passed in vector. You can then use the dbSetRotation() command to pump the values into your object.

You might have to switch the column/row ordering of your matrix for it to work with Newton, I can't remember what way its matrices are constructed right now

Kaiyodo.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 7th Jun 2006 00:56 Edited at: 7th Jun 2006 00:57
Thanks Kaiyodo I will give it a try now.

My W.I.P project

Login to post a reply

Server time is: 2024-11-19 06:52:57
Your offset time is: 2024-11-19 06:52:57