Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Quad, M_D), 1,217 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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