From: Bram Stolk (bram++at++sara.nl)
Date: 10/02/2001 01:23:39
Thomas Proell wrote:
>
> Hi all!
>
> I have a Matrix that represents a certain position and orientation in
> the virtual world. Now, I want to place an object exactly to that
> position. I tried it with pfDCSMat and with pfDCSCoord, both without
Not quite sure what your problem is: if you want the same
position, why not use the same matrix? Maybe reset the orientation
part fist, if you need to.
But:
Getting the translational component from a DCS is easy:
Just get row 3 of the matrix.
pfMatrix m;
dcs.getMat(m)
pfVec3 pos;
m.getRow(3,pos);
Using this to position another obj is just as easy:
m.makeTrans(pos[0],pos[1],pos[2]);
pfSCS scs(m);
When put under the same node in the scene tree, the scs and dcs will
place their children at the exact same location. Only the orient will
differ.
Bram
-- ------------------------------------------------------------------------------ Bram Stolk, VR Specialist. SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM email: bram++at++sara.nl Phone +31-20-5923059 Fax +31-20-6683167"I heard if you play the NT-4.0-CD backwards, you get a satanic message." "Thats nothing, if you play it forward, it installs NT-4.0" ------------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Oct 02 2001 - 01:23:19 PDT