Home
Categories
Dictionary
Download
Project Details
Changes Log
Who We Are
FAQ
License

Map3D Weather Time Manager



The Map3D Weather Time Manager is used to manage lights in the 3D View. It allows to simulate a real light display with a sunlight and a moon light.

This class can be used to manage other weathers visual effect if need arise (rain, thunder, etc...).

Internal properties

Those are the properties to configure the lights of the manager. Notice that you don't really need to change them because you'll probably use the constructor of the manager to set them.
  • sunDegree : specify the initial position of the sun (Default is 90')
  • realSpeedRatio: specify the speed according to the real sun speed (if 1 = 24 hours for a full 360', if 2 = 12 hours... (default is 1000)
  • nightSpeed: night speed ratio according to daySpeed (you should probably want avoid to display to much the night so you can use an highter value than 1), default is 10
  • fps: the fps animation of the sun (and so the light and shadow in the 3D view), defaut is 60
  • onlyMoveAroundZenith:set sun always at zenith, it's will move on XY instead of XZ. There isn't night with this mode
  • stopSun: no move at all


The code offers 2 constructors:
  • One for custom nightspeed: Map3DWeatherTimeManager(int fps, int realSpeedRatio, int nightSpeed)
  • one without night when the last parameter is set to true: Map3DWeatherTimeManager(int fps, int realSpeedRatio, boolean neverNight). The neverNight parameter directly affects the onlyMoveAroundZenith parameter

Performance considerations

The color of the sunLight ( Color.LIGHTGOLDENRODYELLOW) and moonLight ( Color.MIDNIGHTBLUE) are hardcoded in the code. We can imagine that those lights could be replaced using directly a A661_3D_LIGHT_MAP_ITEM (no developed yet) but we still need to keep moving them in the server part to avoid too many update of theirs coordinates.

See also


Categories: dev | jfx | maps3d | performance

Copyright 2016-2017 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v2 licence