Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (juanex, AndrewAMD), 988 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
quaternion from entity pan tilt roll #374169
06/16/11 06:13
06/16/11 06:13
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
I'm trying to produce a quaternion rotation from an entity's pan tilt roll parameters in a dll...this is what im trying so far... doesn't quite work as orientations are wrong. I need this for a D3DXMatrixTransformation matrix...

D3DXQuaternionRotationYawPitchRoll
(
&qrot,
D3DXToRadian(_FLOAT(ent->pan)),
D3DXToRadian(_FLOAT(ent->tilt)),
D3DXToRadian(_FLOAT(ent->roll))
);


Sphere Engine--the premier A6 graphics plugin.
Re: quaternion from entity pan tilt roll [Re: Matt_Aufderheide] #374180
06/16/11 08:13
06/16/11 08:13
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
You don't need quaternions here: Use ang_to_matrix for getting a D3DX transformation matrix.

For converting an angle to a quaternion, you can either use a DirectX function, or use vec_cross to get the rotation axis and the angle about that axis. At least that's the theory, I haven't done it yet.

Re: quaternion from entity pan tilt roll [Re: jcl] #374286
06/16/11 22:46
06/16/11 22:46
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
ok, ang_to_matrix works for what i want... thanks.


Sphere Engine--the premier A6 graphics plugin.

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1