Hi Nan,

On Mon, Feb 7, 2011 at 2:03 PM, Nan WANG <[email protected]> wrote:
> Ok,thanks alot Robert.
>
> But could you tell me how to set current viewer's camera's position?

If you use a CameraManipulator then you'll set the position via it,
the default home position of which can be set via:
viewer.getCameraManipulator()->setHomePosition(...);

If you don't use the CameraManipulator then on each new frame you
simple do:  viewer.getCamera()->setViewMatrix(..).

I would encourage you to have a look at the headers of the osg::Camera
and the osgGA::CameraManipulator subclasses.  There are also plenty of
examples and two books to read which go into their usage.

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

Reply via email to