m b (m_boc++at++hotmail.com)
Fri, 10 Dec 1999 09:30:24 GMT
Good luck,
Mike
-------------
Hi Performers,
has anyone any used the pfiXformer in trackball mode to spin around
different "points of interest" in a scene? I'm trying to extend the way
it's used in perfly which centers on the whole scene and spins around
its geometric centre. What I want is to toggle between various points of
interest and have the trackball center on just specific nodes in my
scene so I can view them from varies angles controlled by the mouse. It
would seem that pfiXformer could do this.
Do I need another DCS other than ViewState->sceneDCS as in perfly?
What calls do I need to make to the pfiXformer class to set a given node
up as spin center?
What I've tried so far is:
static void
toggleXformer(void)
{
static int oIdx = 0;
oIdx = (oIdx + 1) % 2;
/* Centre on given node */
switch (oIdx) {
case 0:
ViewState->xformer->setNode(EarthDCS);
ViewState->xformer->setResetCoord(&ViewState->initView);
printf("earth frame\n");
break;
case 1:
ViewState->xformer->setNode(ShuttleGeo);
ViewState->xformer->setResetCoord(&InitShuttleView);
printf("shuttle frame\n");
break;
}
/* Reset Xformer position */
ViewState->xformer->resetPosition();
ViewState->xformer->getMat(ViewState->viewMat);
ViewState->masterChan->setViewMat(ViewState->viewMat);
}
But it's still rotating around the scene center and not my node
(ShuttleGeo).
I've found pfiXformer and associated classes are not very well
documented and tricky to use so can anyone help me?
Regards, Simon
________________________________________________________________________
Simon Mills
Silicon Worlds S.A.
c/o Modelling & Simulation Section (TOS-EMM) Tel: +31 (0)71 565 3725
European Space Agency (ESA/ESTEC) Fax: +31 (0)71 565 5419
Postbus 299, 2200AG Noordwijk e-mail: simon++at++wgs.estec.esa.nl
The Netherlands http://www.estec.esa.nl/wmwww/EMM
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
This archive was generated by hypermail 2.0b2 on Fri Dec 10 1999 - 01:30:38 PST