1 The Open Scene Graph library, which current FlightGear uses for its 3D
2 graphics, provides excellent support for multiple views of a
3 scene. FlightGear uses the osgViewer::Viewer class, which implements a
4 "master" camera with "slave" cameras that are offset from the master's
5 position and orientation. FlightGear provides the "camera group"
6 abstraction which allows the configuration of slave cameras via the
9 Slave cameras can be mapped to windows that are open on different
10 screens, or all in one window, or a combination of those two schemes,
11 according to the video hardware capabilities of a machine. It is not
12 advisable to open more than one window on a single graphics card due
13 to the added cost of OpenGL context switching between the
14 windows. Usually, multiple monitors attached to a single graphics card
15 are mapped to different pieces of the same desktop, so a window can be
16 opened that spans all the monitors. This is implemented by Nvidia's
17 TwinView technology and the Matrox TripleHead2Go hardware.
19 The camera group is configured by the /sim/rendering/camera-group node
20 in the property tree. It can be set up by, among other things, XML in
21 preferences.xml or in an XML file specified on the command line with
24 Here are the XML tags for defining camera groups.
27 For the moment there can be only one camera group. It can contain
28 window, camera, or gui tags.
31 A window defines a graphics window. It can be at the camera-group
32 level or defined within a camera. The window contains these tags:
35 The name of the window which might be displayed in the window's
36 title bar. It is also used to refer to a previously defined
37 window. A window can contain just a name node, in which case
38 the whole window definition refers to a previously defined window.
41 The name of the host on which the window is opened. Usually this is
45 The display number on which the window is opened.
48 The screen number on which the window is opened.
51 The location on the screen at which the window is opened. This is in
52 the window system coordinates, which usually puts 0,0 at the upper
53 left of the screen XXX check this for Windows.
56 The dimensions of the window.
59 Whether the window manager should decorate the window.
62 Shorthand for a window that occupies the entire screen with no
66 The camera node contains viewing parameters.
69 This specifies the window which displays the camera. Either it
70 contains just a name that refers to a previous window definition, or
71 it is a full window definition.
74 The viewport positions a camera within a window. It is most useful
75 when several cameras share a window.
78 The position of the lower left corner of the viewport, in y-up
82 The dimensions of the viewport
85 The view node specifies the origin and direction of the camera in
86 relation to the whole camera group. The coordinate system is +y up,
87 -z forward in the direction of the camera group view. This is the
88 same as the OpenGL viewing coordinates.
91 Coordinates of the view origin.
93 heading-deg, pitch-deg, roll-deg - double
94 Orientation of the view in degrees. These are specified using the
95 right-hand rule, so a positive heading turns the view to the left,
96 a positive roll rolls the view to the left.
99 This node is one way of specifying the viewing volume camera
100 parameters. It corresponds to the OpenGL gluPerspective function.
103 The vertical field-of-view
105 aspect-ratio - double
106 Aspect ratio of camera rectangle (not the ratio between the
107 vertical and horizontal fields of view).
110 The near and far planes, in meters from the camera eye point. Note
111 that FlightGear assumes that the far plane is far away, currently
112 120km. The far plane specified here will be respected, but the sky
113 and other background elements may not be drawn if the view plane is
116 offset-x, offset-y - double
117 Offsets of the viewing volume specified by the other parameters in
118 the near plane, in meters.
121 This specifies the perspective viewing volume using values for the near
122 and far planes and coordinates of the viewing rectangle in the near
125 left, bottom - double
127 The coordinates of the viewing rectangle.
130 The near and far planes, in meters from the camera eye point.
133 This specifies an orthographic view. The parameters are the sames as
137 This is a special camera node that displays the 2D GUI.
140 This specifies the position and dimensions of the GUI within a
141 window, *however* at the moment the origin must be at 0,0.
143 Here's an example that uses a single window mapped across 3
144 displays. The displays are in a video wall configuration in a
153 <host-name type="string"></host-name>
157 <height>1024</height>
158 <decoration type = "bool">false</decoration>
168 <height>1024</height>
171 <heading-deg type = "double">0</heading-deg>
175 <bottom>-0.133</bottom>
177 <right>-.1668</right>
184 <name type="string">wide</name>
190 <height>1024</height>
193 <heading-deg type = "double">0</heading-deg>
197 <bottom>-0.133</bottom>
212 <height>1024</height>
215 <heading-deg type = "double">0</heading-deg>
219 <bottom>-0.133</bottom>
228 <name type="string">wide</name>
236 Here's a complete example that uses a seperate window on each
237 display. The displays are arranged in a shallow arc with the left and
238 right displays at a 45.3 degree angle to the center display because,
239 at the assumed screen dimensions, the horizontal field of view of one
240 display is 45.3 degrees. Each camera has its own window definition;
241 the center window is given the name "main" so that the GUI definition
242 can refer to it. Note that the borders of the displays are not
251 <host-name type="string"></host-name>
254 <fullscreen type = "bool">true</fullscreen>
257 <heading-deg type = "double">45.3</heading-deg>
261 <bottom>-0.133</bottom>
270 <name type="string">main</name>
271 <host-name type="string"></host-name>
274 <fullscreen type = "bool">true</fullscreen>
277 <heading-deg type = "double">0</heading-deg>
281 <bottom>-0.133</bottom>
290 <host-name type="string"></host-name>
293 <fullscreen type = "bool">true</fullscreen>
296 <heading-deg type = "double">-45.3</heading-deg>
300 <bottom>-0.133</bottom>
309 <name type="string">main</name>