Reed Whittington (reedwhit++at++skips.dseg.ti.com)
Thu, 11 Nov 93 14:39:05 CST
My Performer application is for a tank simulation:
Im trying to implement gun stabalization.
My tank (the ownship) is modeled as chained DCS's :
pfGroup* TankRoot = pfNewGroup();
pfAddChild(ownship->dcs_hull, LoadFile(hull_file, NULL ));
pfAddChild(TankRoot, ownship->dcs_hull);
pfAddChild(ownship->dcs_tur, LoadFile(tur_file, NULL ));
pfAddChild(ownship->dcs_hull, ownship->dcs_tur);
pfAddChild(ownship->dcs_gun, LoadFile(gun_file, NULL ));
pfAddChild(ownship->dcs_tur, ownship->dcs_gun);
pfAddChild(scene, TankRoot);
My sim loop looks something like this (adapted from perfly):
SimLoop:
{
updateView
- update channel views
pfFrame (draw frame N)
updateSim ( for frame N+1 )
- get sim inputs
- calculate new values
- adjust ownship DCS's (these are direct hooks into the scene)
pfDCSRot( ownship->dcs_tur, ownship->tur_heading, 0.0, 0.0 );
do gun stabalization
pfDCSRot( ownship->dcs_gun, 0.0, ownship->gun_pitch, 0.0 );
}
My question is:
Will adjusting the ownship DCS's after pfFrame cause a DCS to shift
during a Cull/Draw? If so what can I do to get around this. I
don't want to have to adjust the DCS's in updateView because of
turret stabalization calculations that need access to intermediate
transformation matrix values after a DCSRot for the turret.
Thanks in advance.
--Reed
********************************
Reed Whittington
Texas Instruments
Visual Simulation Technology Development
MS 8518
6620 Chase Oaks Blvd.
Plano, Texas 75086
(214) 575-6761 off
(214) 575-6771 fax
reedwhit++at++dseg.ti.com
********************************
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:05 PDT