]> git.mxchange.org Git - flightgear.git/commit
add "add-model" command, which adds model properties to the first
authormfranz <mfranz>
Wed, 19 Nov 2008 15:59:54 +0000 (15:59 +0000)
committermfranz <mfranz>
Wed, 19 Nov 2008 15:59:54 +0000 (15:59 +0000)
commit12cf1c41add24b5f22f8e5199002dbb49817d0f5
tree06065d174d1762bcdb6ceead78badc1e04782b9c
parent54744f58e04f0a68483015ca684bb2b7c910fa7f
add "add-model" command, which adds model properties to the first
free /models/model[*] slot and lets the model manager load the
model. The target address is returned under "property". Simple
use in Nasal:

  fgcommand("add-model", props.Node.new({
          "path": "Models/Fauna/cow.ac",
          "latitude-deg": 16.234,
          "longitude-deg": 48.321,
          "elevation-ft": 300,
  });

An "elevation-m" property can alternatively be used and overrides
the "elevation-ft" property.

Each of the properties "latitude-deg", "longitude-deg", "elevation-ft",
"heading-deg", "pitch-deg", and "roll-deg" can alternatively be used
with "-prop" suffix. Their values must then be property path strings
pointing to a node that can be changed at runtime to move the model.
src/Main/fg_commands.cxx