Changes between Version 2 and Version 3 of osgVisualConfiguration
- Timestamp:
- Sep 11, 2010, 10:15:58 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
osgVisualConfiguration
v2 v3 15 15 osgVisual is build on top of !OpenSceneGraph. The core module is osgViewer which provides all the background technolog< to render the scene graph on the screen. You can use all osg and osgVisuer related command line options by adding these options to osgVisual. 16 16 17 To get an overview of the available parmeters, execute 18 {{{ 19 #!sh 20 osgviewer 21 }}} 22 or go to http://www.openscenegraph.org 23 24 17 25 == Configuration via configuration file == 18 26 19 27 For all options which are not OSG but osgVisual related, the configuration mechanism is an XML configuration file. This file contains sections for each module to configure and for the scenery to display. 20 28 21 Example :29 Example of a configuration file with module and scenery configuration: 22 30 {{{ 31 #!xml 23 32 <?xml version="1.0" encoding="ISO-8859-1" ?> 24 33 <osgvisualconfiguration> … … 42 51 </models> 43 52 <datetime day="01" month="02" year="2010" hour="23" minute="45"></datetime> 53 <visibility range="50000" turbidity="2.2" ></visibility> 44 54 <cloudlayer slot="1" type="cumulusCongestus" enabled="true" fadetime="15"> 45 55 <geometry baselength="50000" basewidth="50000" thickness="500" baseHeight="1700" density="0.3"></geometry> … … 49 59 </scenery> 50 60 </osgvisualconfiguration> 61 }}} 51 62 52 63 === Module configuration === 53 64 65 The "module" sections are parsed while instantiation the modules at the beginning of steh startup process. 66 Each module configuration contains at least the name and the enabled/disabled status of the module. Further module parameters are optional and module dependent. 67 68 Example: 69 {{{ 70 #!xml 71 <module name="distortion" enabled="yes"> 72 <distortion channelname="center"></distortion> 73 </module> 74 }}} 75 54 76 === Scenery configuration === 77 78 ==== Terrain ==== 79 80 Example: 81 {{{ 82 #!xml 83 <module name="distortion" enabled="yes"> 84 <distortion channelname="center"></distortion> 85 </module> 55 86 }}} 87 88 ==== Sky/Weather ==== 89 90 Example: 91 {{{ 92 #!xml 93 <datetime day="01" month="02" year="2010" hour="23" minute="45"></datetime> 94 <visibility range="50000" turbidity="2.2" ></visibility> 95 <cloudlayer slot="1" type="cumulusCongestus" enabled="true" fadetime="15"> 96 <geometry baselength="50000" basewidth="50000" thickness="500" baseHeight="1700" density="0.3"></geometry> 97 <precipitation rate_mmPerHour_rain="5.0" rate_mmPerHour_drySnow="7.0" rate_mmPerHour_wetSnow="10.0" rate_mmPerHour_sleet="0.0"></precipitation> 98 </cloudlayer> 99 <windlayer bottom="500.0" top="700." speed="25.0" direction="90.0"></windlayer> 100 }}} 101 102 ==== Models ==== 103 104 Example: 105 {{{ 106 #!xml 107 <models> 108 <model filename="cessna" type="plain" label="TestText!" dynamic="yes"> 109 <position lat="47.12345" lon="11.234567" alt="1500.0"></position> 110 <attitude rot_x="0.0" rot_y="0.0" rot_z="0.0"></attitude> 111 <cameraoffset> 112 <translation trans_x="0.0" trans_y="0.0" trans_z="0.0"></translation> 113 <rotation rot_x="0.0" rot_y="0.0" rot_z="0.0"></rotation> 114 </cameraoffset> 115 </model> 116 </models> 117 }}}