Re: [osg-users] how to update the Camera

2008-03-06 Thread Wu Xiaodong
Hi Robert:

Thank you very much. I mean " *do nothing at all*", and I solve also
the problem by calling the *home();
*The OpenSceneGraph is great.

   xiaodong


On Thu, Mar 6, 2008 at 5:10 PM, Robert Osfield <[EMAIL PROTECTED]>
wrote:

> 2008/3/6 Wu Xiaodong <[EMAIL PROTECTED]>:
> > Hi, Robert:
> >
> >
> > is there any limit on calling setHomePosition and computeHomePosition()?
> >
> > I have taken a try, but it didn't works.
>
> What do you mean by it didn't work, did it do the wrong thing, did it
> do nothing at all?
>
> These methods just set the home position of the camera manipulator,
> they don't actual change the current view, to do this you need to call
> home() on the viewer or camera manipulator.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
吴晓东
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to update the Camera

2008-03-06 Thread Robert Osfield
2008/3/6 Wu Xiaodong <[EMAIL PROTECTED]>:
> Hi, Robert:
>
>
> is there any limit on calling setHomePosition and computeHomePosition()?
>
> I have taken a try, but it didn't works.

What do you mean by it didn't work, did it do the wrong thing, did it
do nothing at all?

These methods just set the home position of the camera manipulator,
they don't actual change the current view, to do this you need to call
home() on the viewer or camera manipulator.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to update the Camera

2008-03-06 Thread Wu Xiaodong
Hi, Robert:


is there any limit on calling setHomePosition and computeHomePosition()?

I have taken a try, but it didn't works.

 xiaodong

On Mon, Mar 3, 2008 at 5:23 PM, Robert Osfield <[EMAIL PROTECTED]>
wrote:

> Hi Xiaodong,
>
> Could it be that you are looking for the camera manipulator
> setHomePosition or computeHomePosition method? i.e.
>
>  viewer.getCamaraManipulator()->setHomePosition(...);
>
> Robert.
>
>
> On Mon, Mar 3, 2008 at 2:35 AM, Wu Xiaodong <[EMAIL PROTECTED]>
> wrote:
> >
> > Hi, I am freshman in OpenSceneGrapph.  Now I have some issue on updating
> the
> > Camera when the Geode under it was updated.
> >
> > the details of the issue is as following.
> >
> >  1st step. I build a viewer and its scene graph with only one
> osg::Geometry
> > which contains nothing. and set a TrackballManipulator to the viewer's
> > camera;
> >
> > osg::ref_ptr trackBall = new
> > osgGA::TrackballManipulator;
> > setCameraManipulator( trackBall.get() );
> >  2nd step. I update the one Geometry by a object of  the class derived
> from
> > the Geometry node's UpdateCallBack class;
> >
> > the default track ball center seems to be the (0,0,0); when the Gemetry
> is
> > updated, the Geometry node's center is changed into (x0,y0,z0); but the
> > track ball rotate around the vertex ( 0,0,0). How can I make it rotate
> > around the (x0,y0,z0 );
> >
> >I read the OSG's reference docs, may I can achieve it by
> > setPreDrawCallback (DrawCallback *cb) .
> >
> >   Is there any advice about the application above, Thanks.
> >
> >Xiaodong
> Wu
> >
> >
> >
> >
> >
> > ___
> >  osg-users mailing list
> >  osg-users@lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
吴晓东
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to update the Camera

2008-03-03 Thread Robert Osfield
Hi Xiaodong,

Could it be that you are looking for the camera manipulator
setHomePosition or computeHomePosition method? i.e.

  viewer.getCamaraManipulator()->setHomePosition(...);

Robert.


On Mon, Mar 3, 2008 at 2:35 AM, Wu Xiaodong <[EMAIL PROTECTED]> wrote:
>
> Hi, I am freshman in OpenSceneGrapph.  Now I have some issue on updating the
> Camera when the Geode under it was updated.
>
> the details of the issue is as following.
>
>  1st step. I build a viewer and its scene graph with only one osg::Geometry
> which contains nothing. and set a TrackballManipulator to the viewer's
> camera;
>
> osg::ref_ptr trackBall = new
> osgGA::TrackballManipulator;
> setCameraManipulator( trackBall.get() );
>  2nd step. I update the one Geometry by a object of  the class derived from
> the Geometry node's UpdateCallBack class;
>
> the default track ball center seems to be the (0,0,0); when the Gemetry is
> updated, the Geometry node's center is changed into (x0,y0,z0); but the
> track ball rotate around the vertex ( 0,0,0). How can I make it rotate
> around the (x0,y0,z0 );
>
>I read the OSG's reference docs, may I can achieve it by
> setPreDrawCallback (DrawCallback *cb) .
>
>   Is there any advice about the application above, Thanks.
>
>Xiaodong Wu
>
>
>
>
>
> ___
>  osg-users mailing list
>  osg-users@lists.openscenegraph.org
>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org