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 ?

> 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 ?

> 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.

        Hope it helps,
                Carsten

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to