...and a few days later I found the Frame event which gives me the
GUIEventAdapter and GUIActionAdapter parameters I need to call
home (const GUIEventAdapter &, GUIActionAdapter &)

calling home(double) seems to work but doesn' t, finaly I also notized
that, after press "s" key to get the nice hud information about framerate
and modeldetails.

I hope now it realy works, not only seems to work :-)

lg
harri

> hi Robert,
>
> thanks for replay
>
> I found 2 home methodes,
>
> void MatrixManipulator::home(double /*currentTime*/)
> and
> void MatrixManipulator::home(const GUIEventAdapter& ea
> ,GUIActionAdapter& us)
>
> I only need this function once, after loading a new osg file an pass it
> to the viewer
> than I call the home(double ) method to have default intial values for
> the viewers camera
>
> this seems to work for most ( i know it will not work for all) camera
> manipulators
>
> the reason why I dont use home(const GUIEventAdapter& ea
> ,GUIActionAdapter& us) is that I dont know from where I can get the/a
> GUIEventAdapter from a place in code where I only know the viewer
> and I do not want to take GUIEventAdapter  I get (at them moment) from
> my keyboardhandler with the handle function, because finaly my app will
> run on a machine without keyboard, and there will be no events like
> resize, mouse, keyboard or anything like that
>
>
> Anyway, at the moment I write just test code, I need a better
> understanding of osg and general 3d gfx programminf and how it works,
>
> I already read that in SVN version the things arround viewer/osgProducer
> have changed.
> So I will use SVN version as soon as possilbe, must do this for the
> project I am working on because I think the next version of osg will be
> released earlier than my project
>
>
> lg
> harri
>
>> Hi Harri,
>>
>> I think tackling things in a bit of awkward way, possible the new
>> osgViewer library in SVN would help make things a bit more straight
>> forward, in that there is just a single getCameraManipulator()
>> attached to the viewer, so you needn't go try to work out which one to
>> operate on.
>>
>> The home(..) method does require two parameters and event adapter and
>> action adapter.  It a bit convoluted.
>>
>> Could someone else cut in and help Harri here, as my RSI is biting.
>>
>>
>> Robert.
>>
>> On 3/9/07, Harald A. <[EMAIL PROTECTED]> wrote:
>>> thank you  Robert
>>>
>>> this
>>>
>>> std::list<std::string> manipulators;
>>> _viewer->getCameraManipulatorNameList( manipulators ) ;
>>> for( std::list<std::string>::iterator pos =  manipulators.begin();
>>>                                 pos !=  manipulators.end(); ++pos ) {
>>>
>>>         _viewer->getCameraManipulatorByName( *pos )->home(0);
>>>
>>> }
>>>
>>> works
>>>
>>> I hope it is not a problem to ignore homes currentTime parameter,
>>> which seems to be ignored by each cameramanipulator
>>>
>>> harri
>>>
>>>
>>> > Hi Harri,
>>> >
>>> > You'll need to look at the  include/osgGA/MatrixManipulator
>>> > definition, here you'll find a home method, as well as a
>>> > setHomePosition().
>>> >
>>> > You'll get the MatrixManipulator form the Viewer, see
>>> > include/osgProducer/Viewer.
>>> >
>>> > Robert.
>>> >
>>> > On 3/9/07, Harald A. <[EMAIL PROTECTED]> wrote:
>>> >> hi,
>>> >>
>>> >> I am using osgProducer::Viewer
>>> >>
>>> >> when loading a scene (viewer.setSceneData(model)) after
>>> >> viewer.realize() the view needs to be reset, how can I do this?
>>> >>
>>> >> please can anyone telll me how I can set the cameras home position
>>> in my programm
>>> >> (calling the home method of the current camere(matrix)
>>> manipulator,
>>> I think that is/should be the right code)
>>> >>
>>> >>
>>> >>
>>> >> thanks for help
>>> >> harri
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> osg-users mailing list
>>> >> [email protected]
>>> >> http://openscenegraph.net/mailman/listinfo/osg-users
>>> >> http://www.openscenegraph.org/
>>> >>
>>> > _______________________________________________
>>> > osg-users mailing list
>>> > [email protected]
>>> > http://openscenegraph.net/mailman/listinfo/osg-users
>>> > http://www.openscenegraph.org/
>>>
>>>
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> [email protected]
>>> http://openscenegraph.net/mailman/listinfo/osg-users
>>> http://www.openscenegraph.org/
>>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://openscenegraph.net/mailman/listinfo/osg-users
>> http://www.openscenegraph.org/
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to