[osg-users] Multiple Graphics contexts, Views, Viewports, Cameras.

41 views
Skip to first unread message

Sergey Bud

unread,
Apr 29, 2014, 4:55:34 PM4/29/14
to osg-...@lists.openscenegraph.org
Hi, All!

Newbie's question. I am having trouble understanding the concepts of the subject. Which one contains which one, how they relate to each other. If I understand correct Viewer contains View and Camera. I am trying to set up multiple view of the same scene from different points. As I understand I can have multiple views and multiple cameras, I saw the examples. But I am having trouble to understand which one I want. I am confused about how those things work. The book says each View has it's own scene, does it mean I will have just two duplicate scene's with CompositeViewer? Are multiple Cameras on the same View is the same as two Views? And in which case it's multiple Graphics contexts?

So basically any help on that matter is appreciated. I am trying to understand the whole concept of Graphics context, View's, Viewports and such. Any reading on this matter is appreciated as well.

Thank you!

Cheers,
Sergey

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





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

Robert Osfield

unread,
Apr 30, 2014, 4:29:46 AM4/30/14
to OpenSceneGraph Users
HI Sergey,

It's worthwhile thinking about the concepts and how they map to classes.

The View(er) class "is a" View, rather than "has a" View. The Viewer
class is special case just for handling a single View and makes it
easy as possible to just set up viewer with a single View of a single
Scene. Slave Camera's can be used in conjunction with the View(er) in
cases where the view is made up of separate windows or rendering
effects that all contribute towards provided the view in intended.
Think of a car simulator where you have a monitor for the windscreen,
and a left and right monitor for the left and right door windows -
you'd have three windows that are are controlled by a single master
view direction, with each one just offset from this direction, each
window maps to a GraphicsWindow.

The CompositeViewer is a more complex and more flexible class that
"has a" list of View(s). Each View can have it's own unique Scene or
share a Scene. Each View can be composed of a single master Camera or
from a set of slave Cameras as above. Multiple Views are useful when
you have independent views of scene such as 3D view and a map view
insert where the scene is the same but the camera that controls the
view direction can be moved independantly. Alternatively you can
independent Scenes in each View, or mix and match to your hearts
content.

Robert.
Reply all
Reply to author
Forward
0 new messages