1
0
Fork 0

Finished setting up configurable default viewing properties, and

implement them for the C172P 3D model.  Look near the top of
preferences.xml for an example.  The recognized properties are as
follow, with vanilla defaults in parentheses:

  /sim/view/config/default-field-of-view-deg (30)
  /sim/view/config/default-pitch-deg (0)
  /sim/view/config/front-direction-deg (0)
  /sim/view/config/front-left-direction-deg (45)
  /sim/view/config/left-direction-deg (90)
  /sim/view/config/back-left-direction-deg (135)
  /sim/view/config/back-direction-deg (180)
  /sim/view/config/back-right-direction-deg (225)
  /sim/view/config/right-direction-deg (270)
  /sim/view/config/front-right-direction-deg (315)

These are particularly useful for the view from inside a 3D aircraft
model.
This commit is contained in:
david 2002-11-02 21:41:53 +00:00
parent ae27863994
commit 03a0ad18eb
3 changed files with 107 additions and 13 deletions

View file

@ -41,14 +41,27 @@ October 23 2001 John Check, fgpanels@rockfish.net
<view> <view>
<internal archive="y">true</internal> <internal archive="y">true</internal>
<config> <config>
<x-offset-m archive="y">-0.4</x-offset-m> <goal-heading-deg>3</goal-heading-deg>
<y-offset-m archive="y">0.3</y-offset-m> <x-offset-m archive="y">-0.15</x-offset-m>
<y-offset-m archive="y">0.25</y-offset-m>
<z-offset-m archive="y">0.1</z-offset-m> <z-offset-m archive="y">0.1</z-offset-m>
<default-field-of-view-deg>50.0</default-field-of-view-deg>
<default-pitch-deg>-9.5</default-pitch-deg>
<front-direction-deg>-1.5</front-direction-deg>
<front-left-direction-deg>45</front-left-direction-deg>
<left-direction-deg>90</left-direction-deg>
<back-left-direction-deg>135</back-left-direction-deg>
<back-direction-deg>180</back-direction-deg>
<back-right-direction-deg>225</back-right-direction-deg>
<right-direction-deg>270</right-direction-deg>
<front-right-direction-deg>315</front-right-direction-deg>
</config> </config>
</view> </view>
<current-view> <current-view>
<pitch-offset-deg>-13</pitch-offset-deg> <field-of-view>50</field-of-view>
<heading-offset-deg>-1.5</heading-offset-deg>
<pitch-offset-deg>-9.5</pitch-offset-deg>
</current-view> </current-view>
</sim> </sim>

View file

@ -330,6 +330,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/back-left-direction-deg"/> <value alias="/sim/view/config/back-left-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -348,6 +353,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/back-direction-deg"/> <value alias="/sim/view/config/back-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -366,6 +376,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/back-right-direction-deg"/> <value alias="/sim/view/config/back-right-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -384,6 +399,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/left-direction-deg"/> <value alias="/sim/view/config/left-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -422,6 +442,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/right-direction-deg"/> <value alias="/sim/view/config/right-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -440,6 +465,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/front-left-direction-deg"/> <value alias="/sim/view/config/front-left-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -458,6 +488,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/front-direction-deg"/> <value alias="/sim/view/config/front-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -476,6 +511,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/front-right-direction-deg"/> <value alias="/sim/view/config/front-right-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -485,7 +525,7 @@ calculated by adding 256 to the GLUT key value in glut.h.
<binding> <binding>
<command>property-assign</command> <command>property-assign</command>
<property>/sim/current-view/field-of-view</property> <property>/sim/current-view/field-of-view</property>
<value type="double">55.0</value> <value alias="/sim/view/config/default-field-of-view-deg"/>
</binding> </binding>
</key> </key>
@ -1054,6 +1094,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/left-direction-deg"/> <value alias="/sim/view/config/left-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -1072,6 +1117,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/front-direction-deg"/> <value alias="/sim/view/config/front-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -1090,6 +1140,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/right-direction-deg"/> <value alias="/sim/view/config/right-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -1108,6 +1163,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/back-direction-deg"/> <value alias="/sim/view/config/back-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -1126,6 +1186,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/front-right-direction-deg"/> <value alias="/sim/view/config/front-right-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -1144,6 +1209,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/back-right-direction-deg"/> <value alias="/sim/view/config/back-right-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -1162,6 +1232,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/front-left-direction-deg"/> <value alias="/sim/view/config/front-left-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>
@ -1180,6 +1255,11 @@ calculated by adding 256 to the GLUT key value in glut.h.
<property>/sim/current-view/goal-heading-offset-deg</property> <property>/sim/current-view/goal-heading-offset-deg</property>
<value alias="/sim/view/config/back-left-direction-deg"/> <value alias="/sim/view/config/back-left-direction-deg"/>
</binding> </binding>
<binding>
<command>property-assign</command>
<property>/sim/current-view/pitch-offset-deg</property>
<value alias="/sim/view/config/default-pitch-deg"/>
</binding>
</mod-shift> </mod-shift>
</key> </key>

View file

@ -91,15 +91,16 @@ Started September 2000 by David Megginson, david@megginson.com
<from-model type="bool">true</from-model> <from-model type="bool">true</from-model>
<from-model-idx type="int">0</from-model-idx> <from-model-idx type="int">0</from-model-idx>
<ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m> <ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
<default-pitch-deg>0</default-pitch-deg> <default-field-of-view-deg type="double">55.0</default-field-of-view-deg>
<front-direction-deg>0</front-direction-deg> <default-pitch-deg type="double">0</default-pitch-deg>
<front-left-direction-deg>45</front-left-direction-deg> <front-direction-deg type="double">0</front-direction-deg>
<left-direction-deg>90</left-direction-deg> <front-left-direction-deg type="double">45</front-left-direction-deg>
<back-left-direction-deg>135</back-left-direction-deg> <left-direction-deg type="double">90</left-direction-deg>
<back-direction-deg>180</back-direction-deg> <back-left-direction-deg type="double">135</back-left-direction-deg>
<back-right-direction-deg>225</back-right-direction-deg> <back-direction-deg type="double">180</back-direction-deg>
<right-direction-deg>270</right-direction-deg> <back-right-direction-deg type="double">225</back-right-direction-deg>
<front-right-direction-deg>315</front-right-direction-deg> <right-direction-deg type="double">270</right-direction-deg>
<front-right-direction-deg type="double">315</front-right-direction-deg>
</config> </config>
</view> </view>