Gene Koh (gene++at++euphoria.corp.sgi.com)
Thu, 1 Aug 1996 14:05:17 -0700
Must have something to do with the inverse of Matrix1 (M), since what you want
to find is a point V such that
M * V = vehicle[1].xyz
My matrix math is fuzzy, but I believe you can multiply both sides by the
inverse to solve for V. There are functions available to invert a pfMatrix.
Sorry about that, and good luck.
>
> OK, so it sounds like you want to know where vehicle[1]'s position (in world
> coordinates) lies relative to vehicle[0]'s local coordinate system.
>
> First, figure out where the origin of vehicle[0]'s coordinate system is in
> world coordinates:
> pfGetDCSMat(vehicle[0].dcs, Matrix1);
> pfSetVec3(origin, 0, 0, 0);
> pfXformPt3(originInWorld, origin, Matrix1);
>
> Then, calculate the difference between vehicle[1]'s position and the position
> of vehicle[0]'s local origin:
>
> xnew = vehicle[1].xyz[PF_X] - originInWorld[PF_X];
> ynew = vehicle[1].xyz[PF_Y] - originInWorld[PF_Y];
> znew = vehicle[1].xyz[PF_Z] - originInWorld[PF_Z];
>
> Hopefully that'll yield something close to correct!
>
> --
> gene koh gene++at++corp.sgi.com 415.933.4230
>
> simplicity patience compassion
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Gene Koh
-- gene koh gene++at++corp.sgi.com 415.933.4230simplicity patience compassion ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:18 PDT