[osg-users] Manage single window, single view and multi cameras scene.

2010-09-21 Thread BARRAL Adrien
Hi,
I am writting an application wich need to use differents view to show the scene.
Operator cas switch from one view to another typing a keyboard key...

For example we start in top view, and when the operator press the c key, 
whe change to subjective (first person) view.

I saw 3 differents approach, I can't make work any of them (for now), and I 
would like to understant difference between these approach, and wich approach I 
must focus on.

1. Use The osgProducer libraries. It seems to be an add on to OSG... If I well 
understand, I must downlad, compile and install the libProducer, and then 
download compile and install the osgProducer plugin... For now I can't compile 
libProducer due to some errors, but with some hours of work, i Will be able to 
compile and install it. But can I do what I want without using Producer ?

2. Use two CameraView objects and the osgWidget::CameraSwitchHandler. 

3. Create two Camera Objetct's, the first one is attached somewhere on the top 
of my vehicle for the top view, and the other one is attached on the driver 
seat for the subjective view. To switch from one camera to the other, I suppose 
that using the method Viewer::setCamera will be correct.


What is the best method ?
Had I forgetten to speek about the best method ?
Does one of these 3 methods is wrong ?


Thank you very much!

Cheers,
BARRAL

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31879#31879





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


Re: [osg-users] Manage single window, single view and multi cameras scene.

2010-09-21 Thread David Glenn
Greetings BARRAL!

Well, I'm not sure if this would be the best way, but I would do one of two 
ways.

1) You can use a composite viewer to have all your views in one window and have 
a camera for each view. 

2) Set up matrix points around your object and set the camera home to the 
matrix point using a key press  -look at the 'osgpick' example in OSG or you 
can some other methodology.

In either case, you can use the bounding box of the object your viewing to help 
set the starting distance of the views.

Hope that helps!

... 

D Glenn


D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your 
Desk!

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31918#31918





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


Re: [osg-users] Manage single window, single view and multi cameras scene.

2010-09-21 Thread BARRAL Adrien
Tom, 

I manage to do that with a CameraViewSwitchManipulator, and two CameraView 
object (one for each view), and that works well...



Thank you for your help

Cheers,
BARRAL

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31923#31923





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