2014-04-29 02:26:32 +00:00
|
|
|
# WARNING: *.draw files will be deprecated, see: http://wiki.flightgear.org/MapStructure
|
2013-12-04 22:19:22 +00:00
|
|
|
##
|
|
|
|
# draw a single storm symbol
|
|
|
|
#
|
|
|
|
|
|
|
|
var draw_storm = func (group, storm, controller=nil, lod=0) {
|
|
|
|
var lat = storm.lat;
|
|
|
|
var lon = storm.lon;
|
|
|
|
var radiusNm = storm.radiusNm;
|
|
|
|
|
|
|
|
var storm_grp = group.createChild("group","storm"); # one group for each storm
|
|
|
|
|
|
|
|
storm_grp.createChild("image")
|
2014-05-25 18:11:13 +00:00
|
|
|
.setFile("Nasal/canvas/map/Images/storm.png")
|
2013-12-04 22:19:22 +00:00
|
|
|
.setSize(128*radiusNm,128*radiusNm)
|
|
|
|
.setTranslation(-64*radiusNm,-64*radiusNm)
|
|
|
|
.setCenter(0,0);
|
|
|
|
|
|
|
|
# the storm position
|
|
|
|
storm_grp.setGeoPosition(lat, lon)
|
|
|
|
.set("z-index",0);
|
|
|
|
|
|
|
|
}
|