-
Notifications
You must be signed in to change notification settings - Fork 6
/
stdafx.h
187 lines (138 loc) · 3.95 KB
/
stdafx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#ifndef precompile_header
// time to undef now
#undef SYSTEMS_API
#define SYSTEMS_API
#include "targetver.h"
//////////////////////////////////
// Common includes
//
#include "common/stl.h"
#include "common/boost.h"
#include "common/osg_inc.h"
#include "common/bullet.h"
#include "common/debug.h"
#ifdef QT
#include "common/qt.h"
#endif
#include "common/av_misc.h"
#pragma warning(disable:4996)
//////////////////////////////////
// Test and debug defines
//
#define ORIG_EPHEMERIS
#define SCREEN_TEXTURE
// #define DEVELOP_SHADOWS
#define TEST_SHADOWS_FROM_OSG
// #define EXPERIMENTAL_RGB_CAM
/////////////////////////////////
// Core utils
//
#include "logger/logger.hpp"
#include "nfi/fn_reg.h"
#include "config/config.h"
#include "cpp_utils/polymorph_ptr.h"
#include "utils/high_res_timer.h"
#include "common/ref_counter.h"
#include <tinyxml2/tinyxml2.h>
#include "xml/tixml_xinclude.h"
/////////////////////////////////
// CG-Lib
//
#include "common/meta.h"
#include "common/av_math.h"
#include "common/points.h"
#include "common/util.h"
#include "geometry/dup_points.h"
#include "geometry/xmath.h"
////////////////////////////////////////////
// Temp stub
//
inline cg::geo_base_3 get_base()
{
return cg::geo_base_3(cg::geo_point_3(0.0,0.0,0));
}
namespace boost {
namespace python {
class object
{
};
inline static object ptr(const void*)
{
return object();
}
}
}
template<typename T>
inline double get_wheel_radius(T node)
{
//const double radius = 0.75 * node->get_bound().radius ;
return /*0.75 **/ (node->get_bound().size().z / 2.);
}
enum objects_t{
NONE_TYPE ,
AIRCRAFT_TYPE,
VEHICLE_TYPE
};
#include "nodes_management_fwd.h"
namespace nm = nodes_management;
namespace vehicle
{
// FIXME for debugging purposes
struct model_base
{
virtual ~model_base () {};
virtual void update ( double /*time*/ ) =0;
virtual void go_to_pos ( cg::geo_point_2 pos, double course ) =0;
#ifdef DEPRECATED
virtual void set_state_debug (state_t const& state) =0 ;
#endif
virtual nodes_management::node_info_ptr get_root()=0;
};
typedef polymorph_ptr<model_base> model_base_ptr;
}
namespace aircraft
{
inline static int max_desired_velocity() {return 20;};
inline static int min_desired_velocity() {return 5;};
inline static double min_radius() {return 18.75;};
inline static double step() {return 2.0;};
}
////////////////////////////////
// Common includes
//
#include "common/event.h"
#include "kernel/systems/mod_system.h"
#include "phys/phys_sys_fwd.h"
////////////////////////////////////////////
// Cg to osg and vice versa
//
#include "av/avUtils/osg_helpers.h"
////////////////////////////////////////////
// Common includes (wrong place)
//
#include "impl/local_position.h" // FIXME îáúåêòû íàäî ïðÿòàòü
#include "fms/trajectory.h"
#include "objects/aircraft_model_inf.h"
#include "objects/nodes_management.h"
////////////////////////////////////////////
// av
//
#include "av/avCore/Database.h"
#include "av/avUtils/visitors/find_node_visitor.h"
#include "av/avUtils/visitors/visitors.h"
#include "av/avScene.h"
namespace utils
{
const osg::Vec4 red_color (100.0f, 0.0f, 0.0f, 100.0f);
const osg::Vec4 blue_color (0.0f, 0.0f, 100.0f, 100.0f);
const osg::Vec4 green_color (0.0f, 100.0f, 0.0f, 100.0f);
const osg::Vec4 white_color (100.0f, 100.0f, 100.0f, 100.0f);
const osg::Vec4 black_color (0.0f,0.0f,0.0f,100.0f);
const osg::Vec4 gray_color (0.8f,0.8f,0.8f,100.0f);
}
#endif // precompile_header