diff --git a/Docs/model-howto.html b/Docs/model-howto.html index cc5ac21d2..9ad5f2440 100644 --- a/Docs/model-howto.html +++ b/Docs/model-howto.html @@ -234,7 +234,7 @@ information.

  • rotate
  • scale
  • blend -
  • select +
  • select
  • spin
  • timed
  • translate @@ -279,7 +279,7 @@ to the new group.

    When objects are translucents, they should be drawn back to front in order to see the world that lies behind through the object. But the drawing order is often the order of appearance in the model file, and it is hard to control inside the -modeler. This way, one can ignore the order in the modeller, and force the +modeler. This way, one can ignore the order in the modeler, and force the reordering at load time. The order is of course the order of appearance of the object-name clause inside the animation. Be aware that this can be ruined by another subsequent animation (last have precedence over first).

    @@ -680,6 +680,67 @@ object, and the rotation acting on the translated object.
    So, as a rule of thumb, remember that animations are executed from the bottom of the animation file to its top.

    +

    Most animations can be conditioned by a boolean expression on +properties. A condition is introduced by the condition element, +like in this example :

    +
     <condition>
    +   <greater-than>
    +    <property>/sim/time/sun-angle-rad</property>
    +    <value>1.57</value>
    +   </greater-than>
    +  </condition>
    +

    Valid condition elements are :

    +
    +
    property
    +
    A valid property full path
    +
    not
    +
    and
    +
    or
    +
    Boolean operators
    +
    less-than
    +
    less-than-equals
    +
    greater-than
    +
    greater-than-equals
    +
    equals
    +
    not-equals
    +
    Comparison operators
    +
    value
    +
    A literal value
    +
    +

    These elements can be combined to build an arbitrary expression.

    +

    Animations without conditions are always executed. Animation with a condition +are only executed when the condition evaluated to true.

    + +

    FlightGear sceneries use shared models. These models are loaded once and +displayed multiple times. If we apply a transformation on an object of the model, +every occurence of the model will show the same transformation, creating a +very unnatural unisson. To solve this kind of problem, several animations +support the notion of personality. It means that a set of parameters are able +to randomly vary in a specified range if the use-personality boolean +property is set to true. For the moment, spin and timed +animations support personality.

    + +

    "select" animation type

    +

    The select animation is there to remove objects ( specified in the object-name +elements ) from the scene when the associated condition evaluated to false.

    +

    In the example below :

    +
     <animation>
    +  <type>select</type>
    +  <object-name>StrobesOn</object-name>
    +  <object-name>StrobesOff</object-name>
    +  <object-name>Fixed</object-name>
    +  <condition>
    +   <greater-than>
    +    <property>/sim/time/sun-angle-rad</property>
    +    <value>1.57</value>
    +   </greater-than>
    +  </condition>
    + </animation>
    +

    Objects StrobesOn, StrobesOff and Fixed are only present + in the scene ( displayed ) when the sun is below the horizon ( the meaning of the condition). + In other words, these objects, that are already in the scene because they were added by the + designer of the model, are removed when the sun is above the horizon.

    +

    "scale" animation type

    Here is a contrived example of one way to use the "scale" animation @@ -849,7 +910,6 @@ on the primary flight display:

    1. step -
    2. scroll
    @@ -1198,8 +1258,8 @@ the same that you would set in <property-base>.
    - - + +