LIM MING WAH (eng30228++at++leonis.nus.sg)
Mon, 6 Jan 1997 16:37:22 +0800 (SST)
void initXformer(void) {
ViewState->xformer = pfiNewTDFXformer(pfGetSharedArena());
pfiXformerAutoInput(ViewState->xformer, ViewState->masterChan,
&ViewState->mouse, &ViewState->events);
pfiXformerNode(ViewState->xformer, ViewState->sceneGroup);
pfiXformerAutoPosition(ViewState->xformer, NULL, ViewState->sceneDCS);
pfiXformerResetCoord(ViewState->xformer, &ViewState->initView);
xformerModel(ViewState->xformerModel, ViewState->collideMode);
resetPosition(POS_ORIG);
}
This is what I have added to perfly;
int oldchoice = -1;
pfMatrix storematrix[20];
void updatepos(int choice)
{
extern int NumFiles;
int current, g;
if (oldchoice == -1) /* Initialising the matrices with the DCSs */
{
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;
}
I have also added to keybd.c ;
void toggleobject(int choice)
{
updatepos(choice);
initXformer();
}
Can anyone tell me what's wrong?
=======================================================================
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:54:16 PDT