Re: Keeping current position

New Message Reply Date view Thread view Subject view Author view

LIM MING WAH (eng30228++at++leonis.nus.sg)
Mon, 6 Jan 1997 14:08:47 +0800 (SST)


On Thu, 2 Jan 1997, Brian Furtaw wrote:

> pfDCS's are absolute they do not accumulate matrix operations. Use a set of
> pfMatrix instances to hold the current transform for each object then use
> pfDCS::setMat(pfMatrix &) to load it into the proper DCS.
>
> Brian
>

I have saved the matrices corresponding to the DCSs and tried loading them
back but instead encountered bus error!!!
The following is what I have done......

         
int oldchoice = -1;

void updatepos(int choice) {

pfMatrix storematrix[20];
extern int NumFiles;
int current, g;

/* Initialising and saving the matrices */
if (oldchoice == -1)
{
        for (g=0; g<NumFiles; g++)
        {
                ViewState->sceneDCS = pointer[g];
                pfGetDCSMat(ViewState->sceneDCS, storematrix[g]);
        }
        oldchoice = 0;
        current = NumFiles - 1;
}

        pfGetDCSMat(ViewState->sceneDCS, storematrix[current]);
        ViewState->sceneDCS = pointer[choice];
        pfDCSMat(ViewState->sceneDCS, storematrix[choice]);
        current = choice;

}

Thanks for the help!!!!!!

Jonathan

=======================================================================
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:54:16 PDT

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