Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Hawaii.h
1 //
2 // Hawai'i.h
3 //
4 // The IslandTerrain class contains Hawaii-specific functionality and test code.
5 //
6 // Copyright (c) 2001-2011 Virtual Terrain Project
7 // Free for all uses, see license.txt for details.
8 
9 #ifndef ISLANDH
10 #define ISLANDH
11 
12 #include "vtlib/core/Terrain.h"
13 
14 // extents of the island landmass
15 #define WEST_EXTENT -156.064270f
16 #define EAST_EXTENT -154.8093872f
17 #define SOUTH_EXTENT 18.9136925f
18 #define NORTH_EXTENT 20.2712955f
19 
20 #define TRANS_XAxis FPoint3(1,0,0)
21 #define TRANS_YAxis FPoint3(0,1,0)
22 #define TRANS_ZAxis FPoint3(0,0,1)
23 
27 class IslandTerrain : public vtTerrain
28 {
29 public:
30  IslandTerrain();
31 
32  // methods
33  void CreateCustomCulture();
34 
35  // override for texture tests
36  void PaintDib(bool progress_callback(int) = NULL);
37 
38  vtGeode *make_test_cone();
39  vtGeode *make_red_cube();
40  void create_state_park();
41  void create_airports();
42  void create_telescopes();
43  void create_building_manually();
44  void do_test_code();
45  void create_airplanes(float fSpeed);
46  void create_airplane(int i, float fSpeed);
47 
48  vtStructureArray3d *m_pSA;
49 };
50 
52 
53 enum AirportCodes {ITO, KOA, MUE, UPP};
54 
55 class PlaneEngine : public vtEngine
56 {
57 public:
58  PlaneEngine(float fSpeedExag, AirportCodes code);
59  void Eval();
60  void SetHoop(int i);
61 
62  FPoint3 m_hoop_pos[10];
63  float m_hoop_speed[10];
64  int m_hoops;
65  int m_hoop;
66 
67  FPoint3 m_pos, m_dir;
68  float m_fSpeed; // in meters/sec
69  float m_fSpeedExag; // this many times normal speed
70  float m_fLastTime;
71 };
72 
73 #endif // ISLANDH
74