Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TerrainRegion.h
Go to the documentation of this file.
1 /* Project Starshatter 4.5
2  Destroyer Studios LLC
3  Copyright © 1997-2005. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: TerrainRegion.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Various heavenly bodies
13 */
14 
15 #ifndef TerrainRegion_h
16 #define TerrainRegion_h
17 
18 #include "Types.h"
19 #include "StarSystem.h"
20 #include "Weather.h"
21 
22 // +--------------------------------------------------------------------+
23 
24 const double TERRAIN_ALTITUDE_LIMIT = 35e3;
25 
26 class TerrainLayer;
27 
28 // +--------------------------------------------------------------------+
29 
31 {
32  friend class StarSystem;
33 
34 public:
35  TerrainRegion(StarSystem* sys, const char* n, double r, Orbital* prime=0);
36  virtual ~TerrainRegion();
37 
38  // operations:
39  virtual void Update();
40 
41  // accessors:
42  const Text& PatchName() const { return patch_name; }
43  const Text& PatchTexture() const { return patch_texture; }
44  const Text& ApronName() const { return apron_name; }
45  const Text& ApronTexture() const { return apron_texture; }
46  const Text& WaterTexture() const { return water_texture; }
47  const Text& DetailTexture0() const { return noise_tex0; }
48  const Text& DetailTexture1() const { return noise_tex1; }
49  const Text& HazeName() const { return haze_name; }
50  const Text& CloudsHigh() const { return clouds_high; }
51  const Text& ShadesHigh() const { return shades_high; }
52  const Text& CloudsLow() const { return clouds_low; }
53  const Text& ShadesLow() const { return shades_low; }
54  const Text& EnvironmentTexture(int n) const;
55 
56  Color SunColor() const { return sun_color[24]; }
57  Color SkyColor() const { return sky_color[24]; }
58  Color FogColor() const { return fog_color[24]; }
59  Color Ambient() const { return ambient[24]; }
60  Color Overcast() const { return overcast[24]; }
61  Color CloudColor() const { return cloud_color[24];}
62  Color ShadeColor() const { return shade_color[24];}
63 
64  double LateralScale() const { return scale; }
65  double MountainScale() const { return mtnscale; }
66  double FogDensity() const { return fog_density; }
67  double FogScale() const { return fog_scale; }
68  double DayPhase() const { return day_phase; }
69  double HazeFade() const { return haze_fade; }
70  double CloudAltHigh() const { return clouds_alt_high; }
71  double CloudAltLow() const { return clouds_alt_low; }
72  Weather& GetWeather() { return weather; }
74 
75  bool IsEclipsed() const { return eclipsed; }
76  void SetEclipsed(bool e) { eclipsed = e; }
77 
78  void LoadSkyColors(const char* bmp_name);
79  void AddLayer(double h, const char* tile, const char* detail=0);
80 
81 protected:
100 
108 
109  double scale;
110  double mtnscale;
111 
112  double fog_density;
113  double fog_scale;
114  double day_phase;
115  double haze_fade;
118 
120  bool eclipsed;
121 
123 };
124 
125 #endif TerrainRegion_h
126