예제 #1
0
        public SkyViewer(Viewer viewer)
        {
            Viewer   = viewer;
            Material = viewer.MaterialManager.Load("Sky");

            // Instantiate classes
            Primitive  = new SkyPrimitive(Viewer.RenderProcess);
            skyVectors = new SunMoonPos();

            // Set starting values
            seasonType = -1;
            // Default wind speed and direction
            windSpeed     = 5.0f; // m/s (approx 11 mph)
            windDirection = 4.7f; // radians (approx 270 deg, i.e. westerly)
        }
예제 #2
0
        public SkyViewer(Viewer viewer)
        {
            Viewer   = viewer;
            Material = viewer.MaterialManager.Load("Sky");

            // Instantiate classes
            Primitive  = new SkyPrimitive(Viewer.RenderProcess);
            skyVectors = new SunMoonPos();

            // Set default values
            seasonType       = (int)Viewer.Simulator.Season;
            date.ordinalDate = 82 + seasonType * 91;
            // TODO: Set the following three externally from ORTS route files (future)
            date.month = 1 + date.ordinalDate / 30;
            date.day   = 21;
            date.year  = 2010;
            // Default wind speed and direction
            windSpeed     = 5.0f; // m/s (approx 11 mph)
            windDirection = 4.7f; // radians (approx 270 deg, i.e. westerly)
        }