Re: local -> world coordinates

New Message Reply Date view Thread view Subject view Author view

george williams (gcw++at++best.com)
Thu, 21 Aug 1997 11:32:35 -0700


At 09:02 PM 8/20/97 -0700, you wrote:
>On Aug 20, 11:59am, sbrown++at++nestor.ucsd.edu wrote:
>> Subject: local -> world coordinates
>>
>> Hi -
>>
>> I'm wondering if there is a simple way to get world coordinates from a
>> local coordinate system.
>>
>> My working knowlege of performer matrix operations is limited, so If this
>> requires matrix operations, an example would be a big help.
>
>You transform the vertex through the matrix of the
>local transformation.
>
>Example Code:
>
>For coords:
>
>coordvec->xformPt(coordvec, modelmatrix);
>
>
>For normals:
>
>normvec->xformVec(normvec, modelmatrix);
>
>
>Cheers,Angus.

If, "local coordinate system" means the matrix relative to parent, then you
might need walk the scene graph from the root node, accumulate matrices, and
then multipy the local coordinates through the accumulated matrix to get
world coordinates. I'm guessing this is what Angus' "modelmatrix" is.

George W.

>
>=======================================================================
>List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>
>

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:45 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.