Lee Butler wrote:
Hi,

What's the appropriate way to set an arbitrary view programmatically when also 
using a camera manipulator?  In particular, I want to be able to load specific 
views from an external source.  These would ideally be specified as a 
combination of eyepoint, lookat, up vectors.

There was some discussion in another thread of using setHomePosition():

viewer.getCameraManipulator()->setHomePosition(...);
viewer.home();
Is this really the right approach?  I don't really want to make this a "home" 
position (no need to retain it), I just want to teleport to the specified view.


Hi, Lee,

I think you can call setByMatrix() on the manipulator, so something like this should work:

matrix = osg::Matrix::lookAt(eye, center, up)
viewer.getCameraManipulator()->setByMatrix(matrix)


--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to