Howto:Creating 3D instruments: Difference between revisions

Jump to navigation Jump to search
m
follow my own advice
No edit summary
m (follow my own advice)
Line 36: Line 36:


<pre>
<pre>
<animation>
    <animation>
  <type>rotate</type>
        <type>rotate</type>
  <object-name>needle</object-name>
        <object-name>needle</object-name>
</pre>
</pre>


Line 49: Line 49:
So, the next line in our XML file will specify the property to use;
So, the next line in our XML file will specify the property to use;


<property>engines/engine/egt_degf</property>
        <property>engines/engine/egt_degf</property>


Next we need to specify exactly how much that property moves the needle.  There are several ways to do this, but we'll use a simple interpolation table since these are especially useful in more complicated situations.  The ITT gauge is marked from 0 degC to 1200 degC; since we're having to use a value that's reported in degF for now, we'll just convert those two values.  0 degC is about 32 degF and 1200 degC is about 2192 degF.  Two handy tips here; for Linux/unix users, the "units" program is truly invaluable; for everyone, google has a useful units converter; for example search for "
Next we need to specify exactly how much that property moves the needle.  There are several ways to do this, but we'll use a simple interpolation table since these are especially useful in more complicated situations.  The ITT gauge is marked from 0 degC to 1200 degC; since we're having to use a value that's reported in degF for now, we'll just convert those two values.  0 degC is about 32 degF and 1200 degC is about 2192 degF.  Two handy tips here; for Linux/unix users, the "units" program is truly invaluable; for everyone, google has a useful units converter; for example search for "
Line 57: Line 57:


<pre>
<pre>
<interpolation>
        <interpolation>
  <entry><ind>32</ind><dep>0</dep></entry>
            <entry><ind>32</ind><dep>0</dep></entry>
  <entry><ind>2192</ind><dep>230</dep></entry>
            <entry><ind>2192</ind><dep>230</dep></entry>
</interpolation>
        </interpolation>
</pre>
</pre>


Line 72: Line 72:


<pre>
<pre>
<center>
        <center>
  <x-m>0</x-m>
            <x-m>0</x-m>
  <y-m>0</y-m>
            <y-m>0</y-m>
  <z-m>0</z-m>
            <z-m>0</z-m>
</center>
        </center>
</pre>
</pre>


Line 82: Line 82:


<pre>
<pre>
<axis>
        <axis>
  <x>-1</x>
            <x>-1</x>
  <y>0</y>
            <y>0</y>
  <z>0</z>
            <z>0</z>
</axis>
        </axis>
</pre>
</pre>


Line 93: Line 93:
That concludes the rotation animation and so (as always) we need to add a suitable closing tag;
That concludes the rotation animation and so (as always) we need to add a suitable closing tag;


</animation>
<pre>
    </animation>
</pre>


'''Digital display:'''
'''Digital display:'''
57

edits

Navigation menu