Hi all, hi dirk, howdy dudes? 

I have been lurking in the mailing list mining some informations about
beacons and navigators, to add a little more freedom of action in my
application. 
In particular i've read some post about the camera transformation
matrices, and built up some demo code. I was able to change the point of
view but... not thanks to the camera beacon. So now i am mostly
confused.
Here is my code:

Navigator *nav=mgr->getNavigator();
NodePtr cameraBeacon = mgr->getCamera()->getBeacon();
TransformPtr cameraTrans = TransformPtr::dcast(cameraBeacon->getCore());
m=cameraTrans->getMatrix();

static float gigi=0;
pro.setTranslate(gigi,0,0);
m.mult (pro);
gigi+=10;

beginEditCP(cameraTrans);
     cameraTrans->setMatrix(m);
endEditCP(cameraTrans);
beginEditCP(cameraBeacon);
     cameraBeacon->setCore(cameraTrans);
endEditCP(cameraBeacon);
     
nav->setCameraTransformation(cameraBeacon);
nav->set(m);

Nothing really exotic: i just query the SSM for the beacon matrix (that,
after some struggling i KNOW it is CORRECT), i add a stupid frame after
frame translation, and i update the various objects involved. In
particular i think that the last 2 lines, the navigator stuff, are in
charge of the moving stuff, but... surprise surprise, just the latter
actually moves the camera. The former doesn't change the point of view.
(discovered that commenting the two lines one after the other). Is the
update of the camera beacon unnecessary? am i doing something wrong? 
My worst fear is that my code works in the single machine app, but that
it will hang when used in cluster...
Can anyone shed some light on the matter? Thanks 
enrico

ps: almost forgot, good week end!  



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to