Hehe, yes, I figured it out 30 seconds after posting, DOH! :)
It's all good now.

/Peter

On 2007-07-29 (Sun) 09:41, Robert Osfield wrote:
> Hi Peter,
> 
> Viewer.run() automatically assigns a camera manipulator if you haven't
> already set one, it does this as a fallback otherwise the view matrix
> would set their at indentity for ever.
> 
> W.r.t sett the home position, use
> TrackbalManipulator::setHomePosition(...) then call home i.e.
> 
>   viewer.getCameraManipualotor()->setHomePosition(...);
>   viewer.home();
> 
> Robert.
> 
> On 7/28/07, Peter Gebauer <[EMAIL PROTECTED]> wrote:
> > Hello there.
> >
> > After testing, I'm starting to get confused. This is what I do now before
> > calling run:
> >
> >     osgGA::TrackballManipulator *manipulator = new 
> > osgGA::TrackballManipulator();
> >     manipulator->setCenter(osg::Vec3f(10.0, 10.0, 0.0));
> >     manipulator->setDistance(50.0);
> >     viewer.setCameraManipulator(manipulator);
> >     viewer.run();
> >
> > But no matter what value I set to center or distance the starting
> > transformation is the same. I've been looking about in the sources, can't
> > find the reason why the trackball manipulator isn't responding to my
> > settings. I'm thinking that either the viewer resets the manipulator values
> > or the center and distance doesn't work like I have pressumed.
> >
> > It'd be nice to have the trackball manipulator working, but to be able to
> > set it's starting whereabouts.
> >
> > /Peter
> >
> >
> > On 2007-07-28 (Sat) 22:08, Robert Osfield wrote:
> > > Hi Peter,
> > >
> > > I presume what you are up against is the use of a Camera Manipulator
> > > that is setting the viewer's Camera's View Matrix on each frame.
> > >
> > > If you don't want the standard manipulator then don't register one,
> > > and instead set the view matrix on each frame i.e
> > >
> > >   viewer.realize();
> > >   while(!viewer.done())
> > >   {
> > >      osg::Matrixd myViewMatrix = ....; // compute in some way.
> > >      viewer.getCamera()->setViewMatrix(myViewMatrx);
> > >      viewer.frame();
> > >   }
> > >
> > > Or alternatively you could just set the home position of the camera 
> > > manipulator.
> > >
> > > Robert.
> > >
> > > On 7/28/07, Peter Gebauer <[EMAIL PROTECTED]> wrote:
> > > > Hi all!
> > > >
> > > > I've found the Viewer very useful in creating quick, browsable 
> > > > scenegraphs,
> > > > but I've hit a problem.
> > > >
> > > > The viewer camera always translates and rotates to fit the entire
> > > > scenegraph at startup. This is a problem when I want to start with more
> > > > distance or slightly skewed angles. The result is that all my transforms
> > > > are "nullified" by the camera compensating for it when starting.
> > > >
> > > > I can move about the scenegraph using the default controls, that's not a
> > > > problem, the problem is only that the starting scenegraph render is not 
> > > > what
> > > > I want or what my manual scenegraph transforms should produce.
> > > >
> > > > Is there any way to get the default camera of the viewer and disable 
> > > > this
> > > > automatic transform? Maybe I can do it directly on the viewer instance?
> > > >
> > > > /Peter
> > > > _______________________________________________
> > > > osg-users mailing list
> > > > [email protected]
> > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > > >
> > > _______________________________________________
> > > osg-users mailing list
> > > [email protected]
> > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to