girish prabhu (prabhu++at++eng.buffalo.edu)
Sat, 1 Oct 1994 16:13:20 -0400
Can somebody tell me what goes wrong here?
/* Initialize Viewing Channel(s) */
void
InitChannel(void)
{
int i;
pfFrameStats *frameStats;
pfChannel *chan;
pfVec3 xyz, hpr;
float fov;
/* Create all channels on the same pipe */
for (i=0; i< NumChans; i++)
Chan[i] = pfNewChan(pfGetPipe(0));
/* Master channel is source for keyboard and mouse input */
ViewState->masterChan = Chan[0];
/* Attach channel to master channel to form a channel group. */
pfAttachChan(ViewState->masterChan, Chan[1]);
/** Offset the Chan[1] to top view +850 up **/
pfSetVec3(xyz, ViewState->xyz[PF_X], ViewState->xyz[PF_Y], 850.0f);
pfSetVec3(hpr, ViewState->hpr[PF_H], -90.0f, ViewState->hpr[PF_R]);
pfChanViewOffsets(Chan[1], xyz, hpr);
pfChanViewport(Chan[1], 0.68f, 1.0f, 0.0f, 0.4f);
chan = ViewState->masterChan;
/* Set the callback routines for the pfChannel */
pfChanCullFunc(chan, CullFunc);
pfChanDrawFunc(chan, DrawFunc);
/* Attach the visual database to the channel */
pfChanScene(chan, ViewState->scene);
/* Attach the EarthSky model to the channel */
pfChanESky(chan, ViewState->eSky);
/* Initialize the near and far clipping planes */
pfChanNearFar(chan, ViewState->near, ViewState->far);
/* Vertical FOV is matched to window aspect ratio. */
pfChanAutoAspect(chan, PFFRUST_CALC_VERT);
pfMakeSimpleFrust(chan, fov);
/* Initialize the viewing position and direction */
pfChanView(chan, ViewState->initView.xyz, ViewState->initView.hpr);
.....
.......
}
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:34 PDT