Carsten Neumann schrieb: > Hello Sadi, > > Sadi Tanis wrote: > >>Hi All! >> >>I am trying to find out how to implement a trackball navigation so that >>the camera turns around a puppet I have loaded via VRML-Loader into the >>scene. For now I tried the set() function which is used in the >>OSG:Navigator class to change the atx,aty,atz values. Afterwards I >>checked the transformation matrix with the getMatrix() function. It >>changed but if I do any mouse action inside the window nothing has >>changed at all. The Camera looks still at the same point: Pnt3f(0,0,0). > > > how does input get from your windowing system to the navigator ?
At the moment I use the SimpleSceneManager because I am not that experienced to "hard code" most of the stuff needed. So far for my two VRML objects (puppet, gymnastics mat) the standard navigation is set. In case this is bad explained by me I also added the code in addition. www.uni-koblenz.de/~saditanis/Archiv.zip > > >>This part I have added for testing into the main function: >> >> >Navigator *nav = new Navigator; >> >nav->set(Pnt3f(0,0,1),Pnt3f(0,0.414,0.910),Vec3f(0,1,0)); >> >nav->updateCameraTransformation(); >> >cout << "current Transformation" << nav->getMatrix() << endl; > > > does this have any effect on your view ? No :( The view is unfortunately the same. > > >>Is there another way to get the camera turn all around the puppet? > > > The Navigator class is meant to be a unification of the FlyNavigator, > TrackballNavigator (the default) and WalkNavigator. It might not be > trivial to use it in the way you do above, as you might get funny > interaction with the Navigators built in behavior. The easiest way to > implement a new type of navigation would probably be to write a new > class SomeNavigator that does what you want, that way you don't have to > understand the Navigator first. On the other hand you'd duplicate some > of the code. Ah ok. I thought that I could just modify the trackball navigation in that way, so the camera turns around my puppet. I also have the impression that by any mouse motion the camera does not move around the scene but the scene around the point of view. I have read something in the mailing list archive about setAbsolute()(turning the parameter off!). But I don't know if this solves the problem. > > Hope it helps, > Carsten > regards, Sadi -- Sadi Tanis University of Koblenz/Landau Student of Computer Vision Simmerner Straße 134 56075 Koblenz Germany Tel. +49.261.208.98.73 E-mail [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
