<?xml version="1.0" encoding="UTF-8"?>

<!-- Couzinet 70 - Arc en Ciel by BARANGER Emmanuel -->
<PropertyList>

 <path>couzinet70.ac</path>

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/couzinet70/Models/Liveries", 10);
    </load>
    <unload>
      livery_update.stop();
    </unload>
  </nasal>

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>heliceG</object-name>
    <object-name>heliceC</object-name>
    <object-name>heliceD</object-name>
    <object-name>bolG</object-name>
    <object-name>bolC</object-name>
    <object-name>bolD</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>direction</object-name>
    <object-name>profondeur</object-name>
    <object-name>derive</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>roueA</object-name>
    <object-name>tourvitres</object-name>
    <object-name>echappe</object-name>
    <object-name>caches</object-name>
    <object-name>echappe</object-name>
    <object-name>moteurs</object-name>
    <object-name>pitot</object-name>
    <object-name>trous</object-name>

    <!-- Objets transparents -->
    <object-name>vitres</object-name>
    <object-name>propblurG</object-name>
    <object-name>propdiscG</object-name>
    <object-name>propblurC</object-name>
    <object-name>propdiscC</object-name>
    <object-name>propblurD</object-name>
    <object-name>propdiscD</object-name>
  </animation>

  <animation>
    <type>shader</type>
    <shader>chrome</shader>
    <texture>glass_shader.png</texture>
    <object-name>vitres</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>vitres</object-name>
    <object-name>propblurG</object-name>
    <object-name>propdiscG</object-name>
    <object-name>propblurC</object-name>
    <object-name>propdiscC</object-name>
    <object-name>propblurD</object-name>
    <object-name>propdiscD</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>heliceG</object-name>
    <object-name>heliceC</object-name>
    <object-name>heliceD</object-name>
    <object-name>bolG</object-name>
    <object-name>bolC</object-name>
    <object-name>bolD</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>direction</object-name>
    <object-name>profondeur</object-name>
    <object-name>derive</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>roueA</object-name>
    <object-name>tourvitres</object-name>
    <object-name>echappe</object-name>
    <object-name>caches</object-name>
    <object-name>echappe</object-name>
    <object-name>moteurs</object-name>
    <object-name>pitot</object-name>
    <object-name>trous</object-name>

    <property-base>sim/model/livery</property-base>
    <texture-prop>texture</texture-prop>
    <texture>texture.png</texture>
<!--
    <diffuse>
      <red-prop>diffuse/red</red-prop>
      <green-prop>diffuse/green</green-prop>
      <blue-prop>diffuse/blue</blue-prop>
    </diffuse>

    <ambient>
      <red-prop>ambient/red</red-prop>
      <green-prop>ambient/green</green-prop>
      <blue-prop>ambient/blue</blue-prop>
    </ambient>
-->
    <specular>
      <red-prop>specular/red</red-prop>
      <green-prop>specular/green</green-prop>
      <blue-prop>specular/blue</blue-prop>
    </specular>

    <emission>
      <red-prop>emission/red</red-prop>
      <green-prop>emission/green</green-prop>
      <blue-prop>emission/blue</blue-prop>
    </emission>
<!--
    <shininess>
      <shininess-prop>shininess</shininess-prop>
    </shininess>
-->
  </animation>

  <!-- Une ombre pour OSG -->
  <model>
    <name>shadowOSG</name>
    <path>Aircraft/couzinet70/Models/shadow.xml</path>
  </model>

  <animation>
    <type>select</type>
    <object-name>shadowOSG</object-name>
    <condition>
      <equals>
        <property>sim[0]/rendering/shadows-ai</property>
        <value>true</value>
      </equals>
    </condition>
  </animation>

  <!-- Interieur -->
  <model>
    <path>Aircraft/couzinet70/Models/Interior/interior.xml</path>
    <offsets>
      <x-m> 0 </x-m>
      <y-m> 0 </y-m>
      <z-m> 0 </z-m>
    </offsets>
  </model>

  <!-- L'hélice centrale --> 
  <animation>
    <name>HeliceCompleteC</name>
    <object-name>propdiscC</object-name>
    <object-name>propblurC</object-name>
    <object-name>heliceC</object-name>
    <object-name>bolC</object-name>
  </animation>

  <!-- Séléction de l'objet visible en fonction des rpm -->
  <animation>
    <type>select</type>
    <object-name>propdiscC</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblurC</object-name>
    <condition>
    <and>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value>600.000</value>
      </greater-than>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>heliceC</object-name>
    <condition>
      <less-than>
        <property>engines/engine[0]/rpm</property>
	<value>1500</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceCompleteC</object-name>
    <property>engines/engine[0]/rpm</property>
    <factor> 1 </factor>
    <center>
      <x-m> -7.430 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.092 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- L'hélice gauche --> 
  <animation>
    <name>HeliceCompleteG</name>
    <object-name>propdiscG</object-name>
    <object-name>propblurG</object-name>
    <object-name>heliceG</object-name>
    <object-name>bolG</object-name>
  </animation>

  <!-- Séléction de l'objet visible en fonction des rpm -->
  <animation>
    <type>select</type>
    <object-name>propdiscG</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[1]/rpm</property>
        <value>1500</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblurG</object-name>
    <condition>
    <and>
      <greater-than>
        <property>engines/engine[1]/rpm</property>
        <value>600.000</value>
      </greater-than>
      <less-than>
        <property>engines/engine[1]/rpm</property>
        <value>1500.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>heliceG</object-name>
    <condition>
      <less-than>
        <property>engines/engine[1]/rpm</property>
	<value>1500</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceCompleteG</object-name>
    <property>engines/engine[1]/rpm</property>
    <factor> 1 </factor>
    <center>
      <x-m> -5.740 </x-m>
      <y-m> -2.691 </y-m>
      <z-m> -0.409 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- L'hélice droite --> 
  <animation>
    <name>HeliceCompleteD</name>
    <object-name>propdiscD</object-name>
    <object-name>propblurD</object-name>
    <object-name>heliceD</object-name>
    <object-name>bolD</object-name>
  </animation>

  <!-- Séléction de l'objet visible en fonction des rpm -->
  <animation>
    <type>select</type>
    <object-name>propdiscD</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[2]/rpm</property>
        <value>1500</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblurD</object-name>
    <condition>
    <and>
      <greater-than>
        <property>engines/engine[2]/rpm</property>
        <value>600.000</value>
      </greater-than>
      <less-than>
        <property>engines/engine[2]/rpm</property>
        <value>1500.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>heliceD</object-name>
    <condition>
      <less-than>
        <property>engines/engine[2]/rpm</property>
	<value>1500</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceCompleteD</object-name>
    <property>engines/engine[2]/rpm</property>
    <factor> 1 </factor>
    <center>
      <x-m> -5.740 </x-m>
      <y-m>  2.691 </y-m>
      <z-m> -0.409 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Animations des ailerons -->
  <animation>
    <type>rotate</type>
    <object-name>aileronG</object-name>
    <property>surface-positions/left-aileron-pos-norm</property>
    <factor>-20</factor>
    <axis>
      <x1-m>  -1.988 </x1-m>
      <y1-m>  -6.994 </y1-m>
      <z1-m>  -0.173 </z1-m>
      <x2-m>  -2.310 </x2-m>
      <y2-m> -10.966 </y2-m>
      <z2-m>  -0.009 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>aileronD</object-name>
    <property>surface-positions/right-aileron-pos-norm</property>
    <factor>-20</factor>
    <axis>
      <x1-m> -2.310 </x1-m>
      <y1-m> 10.966 </y1-m>
      <z1-m> -0.009 </z1-m>
      <x2-m> -1.988 </x2-m>
      <y2-m>  6.994 </y2-m>
      <z2-m> -0.173 </z2-m>
    </axis>
  </animation>

  <!-- Gouverne de profondeur -->
  <animation>
    <type>rotate</type>
    <object-name>profondeur</object-name>
    <property>surface-positions/elevator-pos-norm</property>
    <factor> 20 </factor>
    <center>
      <x-m> 5.820 </x-m>
      <y-m> 0.000 </y-m>
      <z-m> 0.846</z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Gouverne de direction -->
  <animation>
    <type>rotate</type>
    <object-name>direction</object-name>
    <property>surface-positions/rudder-pos-norm</property>
    <factor> 20 </factor>
    <center>
      <x-m> 6.449 </x-m>
      <y-m> 0.000 </y-m>
      <z-m> 1.157 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

  <!-- Rotation des roues lors du roulage -->
  <animation>
    <type>spin</type>
    <object-name>roueG</object-name>
    <property>gear/gear[0]/rollspeed-ms</property>
    <factor>30</factor>
    <center>
      <x-m> -3.991 </x-m>
      <y-m> -3.589 </y-m>
      <z-m> -1.431 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>roueD</object-name>
    <property>gear/gear[1]/rollspeed-ms</property>
    <factor>30</factor>
    <center>
      <x-m> -3.991 </x-m>
      <y-m>  3.589 </y-m>
      <z-m> -1.431 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>roueA</object-name>
    <property>gear/gear[2]/rollspeed-ms</property>
    <factor>30</factor>
    <center>
      <x-m>  5.990 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.244 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Ajout des effets lumineux -->
  <model>
    <path>Aircraft/couzinet70/Models/light/beacon.xml</path>
    <offsets>
      <x-m> 6.442 </x-m>
      <y-m> 0.000 </y-m>
      <z-m> 1.899 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/couzinet70/Models/light/RedLight.xml</path>
    <offsets>
      <x-m>  -3.499 </x-m>
      <y-m> -14.822 </y-m>
      <z-m>   0.265 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/couzinet70/Models/light/GreenLight.xml</path>
    <offsets>
      <x-m> -3.499 </x-m>
      <y-m> 14.822 </y-m>
      <z-m>  0.265 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/couzinet70/Models/light/StrobeWhite.xml</path>
    <offsets>
      <x-m>  -3.399 </x-m>
      <y-m> -14.822 </y-m>
      <z-m>   0.265 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/couzinet70/Models/light/StrobeWhite.xml</path>
    <offsets>
      <x-m> -3.399 </x-m>
      <y-m> 14.822 </y-m>
      <z-m>  0.265 </z-m>
    </offsets>
  </model>

</PropertyList>

