Re: C++ class library

New Message Reply Date view Thread view Subject view Author view

John C Vanderburgh (jvanderb++at++afit.af.mil)
Fri, 23 Sep 1994 13:36:43 -0400


Hey all,
  I'm working on a Performer application that models
satellites in near-Earth orbit. I position the viewpoint
arbitrarily out in "space" to view the satellites.
One of the options for the user is to show
satellite "trails" , i.e. lines showing where the satellite
has been in its orbit. I render the satellite trails after
I call "pfDraw", so my draw callback looks like this:

----------------------------------------------
void DrawChannel(pfChannel *chan, void *data)
{
  /* Draw some terrain */
      .
      .
      .
  /* Check for and process user-input via the "qread" call */
      .
      .
      .

  pfClearChan(chan);
  pfDraw();

  /* Now draw my satellite trails: */
  pfPushState ();
  pfBasicState ();

  Draw_Satellite_Trails ();

  pfPopState ();
}
-----------------------------------------------

Whenever the viewpoint is stationary, the satellite trails
are drawn correctly. However, as I'm moving the viewpoint
the satellite trails appear to be one "step" behind the
viewpoint movement. (As the viewpoint moves faster, the problem
is more evident.) Inside "Draw_Satellite_Trails", I compute
the position of each trail point relative to the current
viewpoint position. If I output the viewpoint position from
my app-thread and compare it to the viewpoint position inside
"Draw_Satellite_Trails", they are identical.

Does anyone have any ideas as to what I'm doing wrong? One
explanation would be that Performer is swapping buffers between
the "pfDraw" call and my "Draw_Satellite_Trails" call... (but
that doesn't sound quite right).

Thanks in advance,

John Vanderburgh
Air Force Institute of Technology
Wright-Patterson AFB, OH
(jvanderb++at++afit.af.mil)


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:50:33 PDT

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